Ewall_Customtags - Version 1.0.0

Version Notes

This is the first version of the extension

Download this release

Release Info

Developer Ewallsolutions
Extension Ewall_Customtags
Version 1.0.0
Comparing to
See all releases


Version 1.0.0

Files changed (34) hide show
  1. app/code/local/Ewall/Advancetag/Block/Flashtag.php +146 -0
  2. app/code/local/Ewall/Advancetag/Helper/Data.php +4 -0
  3. app/code/local/Ewall/Advancetag/Model/Source/Type.php +11 -0
  4. app/code/local/Ewall/Advancetag/etc/config.xml +58 -0
  5. app/code/local/Ewall/Advancetag/etc/system.xml +209 -0
  6. app/code/local/Ewall/Customtags/Block/Adminhtml/Customtags.php +12 -0
  7. app/code/local/Ewall/Customtags/Block/Adminhtml/Customtags/Edit.php +45 -0
  8. app/code/local/Ewall/Customtags/Block/Adminhtml/Customtags/Edit/Form.php +19 -0
  9. app/code/local/Ewall/Customtags/Block/Adminhtml/Customtags/Edit/Tab/Form.php +59 -0
  10. app/code/local/Ewall/Customtags/Block/Adminhtml/Customtags/Edit/Tabs.php +24 -0
  11. app/code/local/Ewall/Customtags/Block/Adminhtml/Customtags/Grid.php +119 -0
  12. app/code/local/Ewall/Customtags/Block/Customtags.php +30 -0
  13. app/code/local/Ewall/Customtags/Helper/Data.php +6 -0
  14. app/code/local/Ewall/Customtags/Model/Customtags.php +10 -0
  15. app/code/local/Ewall/Customtags/Model/Mysql4/Customtags.php +10 -0
  16. app/code/local/Ewall/Customtags/Model/Mysql4/Customtags/Collection.php +10 -0
  17. app/code/local/Ewall/Customtags/Model/Status.php +15 -0
  18. app/code/local/Ewall/Customtags/controllers/Adminhtml/CustomtagsController.php +180 -0
  19. app/code/local/Ewall/Customtags/controllers/IndexController.php +9 -0
  20. app/code/local/Ewall/Customtags/etc/config.xml +120 -0
  21. app/code/local/Ewall/Customtags/sql/customtags_setup/mysql4-install-0.1.0.php +23 -0
  22. app/design/adminhtml/default/default/layout/customtags.xml +8 -0
  23. app/design/frontend/default/default/layout/advancetag.xml +7 -0
  24. app/design/frontend/default/default/layout/customtags.xml +10 -0
  25. app/design/frontend/default/default/layout/tag.xml +134 -0
  26. app/design/frontend/default/default/template/advancetag/flashtag.phtml +27 -0
  27. app/design/frontend/default/default/template/advancetag/smallflashtag.phtml +26 -0
  28. app/design/frontend/default/default/template/customtags/customtags.phtml +13 -0
  29. app/etc/modules/Ewall_Advancetag .xml +9 -0
  30. app/etc/modules/Ewall_Customtags.xml +9 -0
  31. js/advancetag/swfobject.js +133 -0
  32. js/advancetag/tagcloud.swf +0 -0
  33. package.xml +18 -0
  34. skin/frontend/default/default/js/swfobject21.js +5 -0
app/code/local/Ewall/Advancetag/Block/Flashtag.php ADDED
@@ -0,0 +1,146 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Ewall_Advancetag_Block_Flashtag extends Mage_Tag_Block_Popular
3
+ {
4
+ private $_tagsAll;//stores all tags
5
+ protected $_minPopularity;
6
+ protected $_maxPopularity;
7
+
8
+ public function _prepareLayout()
9
+ {
10
+ return parent::_prepareLayout();
11
+ }
12
+
13
+ protected function _loadTagsByNum($num)
14
+ {
15
+ if (empty($this->_tagsAll)) {
16
+ $this->_tagsAll = array();
17
+
18
+ $tags = Mage::getModel('tag/tag')->getPopularCollection()
19
+ ->joinFields(Mage::app()->getStore()->getId())
20
+ ->limit($num)
21
+ ->load()
22
+ ->getItems();
23
+ if( count($tags) == 0 ) {
24
+ return $this;
25
+ }
26
+
27
+
28
+ $this->_maxPopularity = reset($tags)->getPopularity();
29
+ $this->_minPopularity = end($tags)->getPopularity();
30
+ $range = $this->_maxPopularity - $this->_minPopularity;
31
+ $range = ( $range == 0 ) ? 1 : $range;
32
+ foreach ($tags as $tag) {
33
+ if( !$tag->getPopularity() ) {
34
+ continue;
35
+ }
36
+ $tag->setRatio(($tag->getPopularity()-$this->_minPopularity)/$range);
37
+ $this->_tagsAll[$tag->getName()] = $tag;
38
+ }
39
+
40
+ $customtags = Mage::getModel('customtags/customtags')->getCollection();
41
+ foreach($customtags as $ctag) {
42
+ $ctag->setRatio($ctag->getContent()/100);
43
+ $ctag->setTaggedProductsUrl($ctag->getFilename());
44
+ $ctag->setName($ctag->getTitle());
45
+ $this->_tagsAll[$ctag->getTitle()] = $ctag;
46
+ }
47
+ ksort($this->_tagsAll);
48
+ }
49
+ return $this;
50
+ }
51
+
52
+ public function _getTags($n)
53
+ {
54
+ $this->_loadTagsByNum($n);
55
+ return $this->_tagsAll;
56
+ }
57
+
58
+ public function getMaxPopularity()
59
+ {
60
+ return $this->_maxPopularity;
61
+ }
62
+
63
+ public function getMinPopularity()
64
+ {
65
+ return $this->_minPopularity;
66
+ }
67
+ /*
68
+ *
69
+ * $_type:1 is for all tags list(big blcok);2 is for small block
70
+ */
71
+ public function getFlashTag($_type){
72
+ $type='';
73
+ if($_type==1){
74
+ $type='';
75
+ }else{
76
+ $type="2";
77
+ }
78
+ //retrieve values of options
79
+ $options=array();
80
+ $options['width']=Mage::getStoreConfig("admin/ewall_advancetag{$type}/width");
81
+ $options['height']=Mage::getStoreConfig("admin/ewall_advancetag{$type}/height");
82
+ $options['tcolor']=Mage::getStoreConfig("admin/ewall_advancetag{$type}/color1");
83
+ $options['tcolor2']=Mage::getStoreConfig("admin/ewall_advancetag{$type}/color2");
84
+ $options['hicolor']=Mage::getStoreConfig("admin/ewall_advancetag{$type}/color3");
85
+ $options['bgcolor']=Mage::getStoreConfig("admin/ewall_advancetag{$type}/color4");
86
+ $options['speed']=Mage::getStoreConfig("admin/ewall_advancetag{$type}/speed");
87
+ $options['type']=Mage::getStoreConfig("admin/ewall_advancetag{$type}/type");
88
+ $options['trans']=Mage::getStoreConfig("admin/ewall_advancetag{$type}/transparent");
89
+ $n=0;
90
+ if($options['type']=='popular'){
91
+ $n=20;
92
+ }elseif($options['type']=='all'){
93
+ $n=100;
94
+ }
95
+ if(Mage::getStoreConfig("admin/ewall_advancetag{$type}/distribute")){
96
+ $options['distr']="true";
97
+ }else{
98
+ $options['distr']="";
99
+ }
100
+
101
+ $js_path=Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS)."advancetag/";
102
+ $divname="wpcumuluscontent";
103
+ $soname="so";
104
+ $tags=$this->_getTags($n);
105
+ $tagsout='';
106
+ $i=1;
107
+ foreach($tags as $t){
108
+ if($i==1){
109
+ $tagsout.="<a href='".$t->getTaggedProductsUrl()."' class='tag-link-".$i."' title='1 topic' style='font-size:".($t->getRatio()*10+10)."pt;'>".$t->getName()."</a>";
110
+ }else{
111
+ $tagsout.=$i."<a href='".$t->getTaggedProductsUrl()."' class='tag-link-".$i."' title='1 topic' style='font-size:".($t->getRatio()*10+10)."pt;'>".$t->getName()."</a>";
112
+ }
113
+ $i++;
114
+ }
115
+ $tagcloud = urldecode( str_replace( "&nbsp;", " ", $tagsout ) );
116
+
117
+ $movie = $js_path.'tagcloud.swf';
118
+
119
+ $flashtag = '<!-- SWFObject embed by Geoff Stearns geoff@deconcept.com http://blog.deconcept.com/swfobject/ -->';
120
+ $flashtag .= '<script type="text/javascript" src="'.$js_path.'swfobject.js"></script>';
121
+ $flashtag .= '<div id="'.$divname.'"><p style="display:none;">';
122
+ // alternate content
123
+ $flashtag .= urldecode($tagcloud);
124
+ $flashtag .= '</p><p>Flash tag cloud requires Flash Player 9 or better.</p></div>';
125
+ $flashtag .= '<script type="text/javascript">';
126
+ $flashtag .= 'var rnumber = Math.floor(Math.random()*9999999);'; // force loading of movie to fix IE weirdness
127
+ $flashtag .= 'var '.$soname.' = new SWFObject("'.$movie.'?r="+rnumber, "tagcloudflash", "'.$options['width'].'", "'.$options['height'].'", "9", "#'.$options['bgcolor'].'");';
128
+ if( $options['trans'] == 1 ){
129
+ $flashtag .= $soname.'.addParam("wmode", "transparent");';
130
+ }else{
131
+ $flashtag .= $soname.'.addParam("wmode", "Opaque");';
132
+ }
133
+ $flashtag .= $soname.'.addParam("allowScriptAccess", "always");';
134
+ $flashtag .= $soname.'.addVariable("tcolor", "0x'.$options['tcolor'].'");';
135
+ $flashtag .= $soname.'.addVariable("tcolor2", "0x' . ($options['tcolor2'] == "" ? $options['tcolor'] : $options['tcolor2']) . '");';
136
+ $flashtag .= $soname.'.addVariable("hicolor", "0x' . ($options['hicolor'] == "" ? $options['tcolor'] : $options['hicolor']) . '");';
137
+ $flashtag .= $soname.'.addVariable("tspeed", "'.$options['speed'].'");';
138
+ $flashtag .= $soname.'.addVariable("distr", "'.$options['distr'].'");';
139
+ $flashtag .= $soname.'.addVariable("mode", "tags");';
140
+ // put tags in flashvar
141
+ $flashtag .= $soname.'.addVariable("tagcloud", "'.urlencode('<tags>') . $tagcloud . urlencode('</tags>').'");';
142
+ $flashtag .= $soname.'.write("'.$divname.'");';
143
+ $flashtag .= '</script>';
144
+ return $flashtag;
145
+ }
146
+ }
app/code/local/Ewall/Advancetag/Helper/Data.php ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ <?php
2
+ class Ewall_Advancetag_Helper_Data extends Mage_Core_Helper_Abstract {
3
+
4
+ }
app/code/local/Ewall/Advancetag/Model/Source/Type.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Ewall_Advancetag_Model_Source_Type
3
+ {
4
+ public function toOptionArray()
5
+ {
6
+ return array(
7
+ array('value' => 'popular', 'label' => Mage::helper('ewall_advancetag')->__('Popular Tags')),
8
+ array('value' => 'all', 'label' => Mage::helper('ewall_advancetag')->__('All Tags')),
9
+ );
10
+ }
11
+ }
app/code/local/Ewall/Advancetag/etc/config.xml ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Ewall_Advancetag>
5
+ <version>1.0.0</version>
6
+ </Ewall_Advancetag>
7
+ </modules>
8
+ <global>
9
+ <helpers>
10
+ <ewall_advancetag>
11
+ <class>Ewall_Advancetag_Helper</class>
12
+ </ewall_advancetag>
13
+ </helpers>
14
+ <models>
15
+ <ewall_advancetag>
16
+ <class>Ewall_Advancetag_Model</class>
17
+ </ewall_advancetag>
18
+ </models>
19
+ <blocks>
20
+ <advancetag><class>Ewall_Advancetag_Block</class></advancetag>
21
+ </blocks>
22
+ </global>
23
+ <default>
24
+ <admin>
25
+ <ewall_advancetag>
26
+ <isdisplay>1</isdisplay>
27
+ <width>600</width>
28
+ <height>400</height>
29
+ <color1>ffffff</color1>
30
+ <color2>ffffff</color2>
31
+ <color3>ffffff</color3>
32
+ <color4>333333</color4>
33
+ <speed>100</speed>
34
+ </ewall_advancetag>
35
+ <ewall_advancetag2>
36
+ <isdisplay>1</isdisplay>
37
+ <width>170</width>
38
+ <height>200</height>
39
+ <color1>ffffff</color1>
40
+ <color2>ffffff</color2>
41
+ <color3>ffffff</color3>
42
+ <color4>333333</color4>
43
+ <speed>100</speed>
44
+ </ewall_advancetag2>
45
+ </admin>
46
+ </default>
47
+ <adminhtml>
48
+ <translate>
49
+ <modules>
50
+ <Ewall_Advancetag>
51
+ <files>
52
+ <default>Ewall_Advancetag.csv</default>
53
+ </files>
54
+ </Ewall_Advancetag>
55
+ </modules>
56
+ </translate>
57
+ </adminhtml>
58
+ </config>
app/code/local/Ewall/Advancetag/etc/system.xml ADDED
@@ -0,0 +1,209 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <sections>
4
+ <admin>
5
+ <groups>
6
+ <ewall_advancetag translate="label" module="tag"><!-- this group is for big block -->
7
+ <label>Advance Tags (For Tags List Page)</label>
8
+ <sort_order>550</sort_order>
9
+ <show_in_default>1</show_in_default>
10
+ <show_in_website>1</show_in_website>
11
+ <show_in_store>0</show_in_store>
12
+ <fields>
13
+ <isdisplay translate="label">
14
+ <label>Is Display?</label>
15
+ <frontend_type>select</frontend_type>
16
+ <source_model>adminhtml/system_config_source_yesno</source_model>
17
+ <sort_order>0</sort_order>
18
+ <show_in_default>1</show_in_default>
19
+ <show_in_website>1</show_in_website>
20
+ <comment>select "Yes" to display it</comment>
21
+ </isdisplay>
22
+ <width translate="label">
23
+ <label>Width</label>
24
+ <frontend_type>text</frontend_type>
25
+ <sort_order>1</sort_order>
26
+ <show_in_default>1</show_in_default>
27
+ <show_in_website>1</show_in_website>
28
+ <comment>Width of the Flash tag cloud</comment>
29
+ </width>
30
+ <height translate="label">
31
+ <label>Height</label>
32
+ <frontend_type>text</frontend_type>
33
+ <sort_order>10</sort_order>
34
+ <show_in_default>1</show_in_default>
35
+ <show_in_website>1</show_in_website>
36
+ <comment>Height of the Flash tag cloud</comment>
37
+ </height>
38
+ <color1 translate="label">
39
+ <label>Color of the tags</label>
40
+ <frontend_type>text</frontend_type>
41
+ <sort_order>20</sort_order>
42
+ <show_in_default>1</show_in_default>
43
+ <show_in_website>1</show_in_website>
44
+ <comment>optional</comment>
45
+ </color1>
46
+ <color2 translate="label">
47
+ <label>color for gradient</label>
48
+ <frontend_type>text</frontend_type>
49
+ <sort_order>30</sort_order>
50
+ <show_in_default>1</show_in_default>
51
+ <show_in_website>1</show_in_website>
52
+ <comment>optional</comment>
53
+ </color2>
54
+ <color3 translate="label">
55
+ <label>highlight color</label>
56
+ <frontend_type>text</frontend_type>
57
+ <sort_order>40</sort_order>
58
+ <show_in_default>1</show_in_default>
59
+ <show_in_website>1</show_in_website>
60
+ <comment>These should be 6 character hex color values without the # prefix (000000 for black, ffffff for white) optional</comment>
61
+ </color3>
62
+ <color4 translate="label">
63
+ <label>Background color</label>
64
+ <frontend_type>text</frontend_type>
65
+ <sort_order>50</sort_order>
66
+ <show_in_default>1</show_in_default>
67
+ <show_in_website>1</show_in_website>
68
+ <comment>6 character hex color value</comment>
69
+ </color4>
70
+ <transparent translate="label">
71
+ <label>Use transparent mode</label>
72
+ <frontend_type>select</frontend_type>
73
+ <source_model>adminhtml/system_config_source_yesno</source_model>
74
+ <sort_order>60</sort_order>
75
+ <show_in_default>1</show_in_default>
76
+ <show_in_website>1</show_in_website>
77
+ <comment>Switches on Flash's wmode-transparent setting</comment>
78
+ </transparent>
79
+ <speed translate="label">
80
+ <label>Rotation speed</label>
81
+ <frontend_type>text</frontend_type>
82
+ <sort_order>70</sort_order>
83
+ <show_in_default>1</show_in_default>
84
+ <show_in_website>1</show_in_website>
85
+ <comment>Speed (percentage, default is 100)</comment>
86
+ </speed>
87
+ <distribute translate="label">
88
+ <label>Distribute tags evenly on sphere</label>
89
+ <frontend_type>select</frontend_type>
90
+ <source_model>adminhtml/system_config_source_yesno</source_model>
91
+ <sort_order>80</sort_order>
92
+ <show_in_default>1</show_in_default>
93
+ <show_in_website>1</show_in_website>
94
+ <comment>Places tags at equal intervals instead of random</comment>
95
+ </distribute>
96
+ <type translate="label">
97
+ <label>Type of Tags</label>
98
+ <frontend_type>select</frontend_type>
99
+ <source_model>ewall_advancetag/source_type</source_model>
100
+ <sort_order>90</sort_order>
101
+ <show_in_default>1</show_in_default>
102
+ <show_in_website>1</show_in_website>
103
+ </type>
104
+ </fields>
105
+ </ewall_advancetag>
106
+ <ewall_advancetag2 translate="label" module="tag"> <!-- this group is for small block -->
107
+ <label>Advance Tags (For Small Block)</label>
108
+ <sort_order>650</sort_order>
109
+ <show_in_default>1</show_in_default>
110
+ <show_in_website>1</show_in_website>
111
+ <show_in_store>0</show_in_store>
112
+ <fields>
113
+ <isdisplay translate="label">
114
+ <label>Is Display?</label>
115
+ <frontend_type>select</frontend_type>
116
+ <source_model>adminhtml/system_config_source_yesno</source_model>
117
+ <sort_order>0</sort_order>
118
+ <show_in_default>1</show_in_default>
119
+ <show_in_website>1</show_in_website>
120
+ <comment>select "Yes" to display it</comment>
121
+ </isdisplay>
122
+ <width translate="label">
123
+ <label>Width</label>
124
+ <frontend_type>text</frontend_type>
125
+ <sort_order>1</sort_order>
126
+ <show_in_default>1</show_in_default>
127
+ <show_in_website>1</show_in_website>
128
+ <comment>Width of the Flash tag cloud</comment>
129
+ </width>
130
+ <height translate="label">
131
+ <label>Height</label>
132
+ <frontend_type>text</frontend_type>
133
+ <sort_order>10</sort_order>
134
+ <show_in_default>1</show_in_default>
135
+ <show_in_website>1</show_in_website>
136
+ <comment>Height of the Flash tag cloud</comment>
137
+ </height>
138
+ <color1 translate="label">
139
+ <label>Color of the tags</label>
140
+ <frontend_type>text</frontend_type>
141
+ <sort_order>20</sort_order>
142
+ <show_in_default>1</show_in_default>
143
+ <show_in_website>1</show_in_website>
144
+ <comment>optional</comment>
145
+ </color1>
146
+ <color2 translate="label">
147
+ <label>color for gradient</label>
148
+ <frontend_type>text</frontend_type>
149
+ <sort_order>30</sort_order>
150
+ <show_in_default>1</show_in_default>
151
+ <show_in_website>1</show_in_website>
152
+ <comment>optional</comment>
153
+ </color2>
154
+ <color3 translate="label">
155
+ <label>highlight color</label>
156
+ <frontend_type>text</frontend_type>
157
+ <sort_order>40</sort_order>
158
+ <show_in_default>1</show_in_default>
159
+ <show_in_website>1</show_in_website>
160
+ <comment>These should be 6 character hex color values without the # prefix (000000 for black, ffffff for white) optional</comment>
161
+ </color3>
162
+ <color4 translate="label">
163
+ <label>Background color</label>
164
+ <frontend_type>text</frontend_type>
165
+ <sort_order>50</sort_order>
166
+ <show_in_default>1</show_in_default>
167
+ <show_in_website>1</show_in_website>
168
+ <comment>6 character hex color value</comment>
169
+ </color4>
170
+ <transparent translate="label">
171
+ <label>Use transparent mode</label>
172
+ <frontend_type>select</frontend_type>
173
+ <source_model>adminhtml/system_config_source_yesno</source_model>
174
+ <sort_order>60</sort_order>
175
+ <show_in_default>1</show_in_default>
176
+ <show_in_website>1</show_in_website>
177
+ <comment>Switches on Flash's wmode-transparent setting</comment>
178
+ </transparent>
179
+ <speed translate="label">
180
+ <label>Rotation speed</label>
181
+ <frontend_type>text</frontend_type>
182
+ <sort_order>70</sort_order>
183
+ <show_in_default>1</show_in_default>
184
+ <show_in_website>1</show_in_website>
185
+ <comment>Speed (percentage, default is 100)</comment>
186
+ </speed>
187
+ <distribute translate="label">
188
+ <label>Distribute tags evenly on sphere</label>
189
+ <frontend_type>select</frontend_type>
190
+ <source_model>adminhtml/system_config_source_yesno</source_model>
191
+ <sort_order>80</sort_order>
192
+ <show_in_default>1</show_in_default>
193
+ <show_in_website>1</show_in_website>
194
+ <comment>Places tags at equal intervals instead of random</comment>
195
+ </distribute>
196
+ <type translate="label">
197
+ <label>Type of Tags</label>
198
+ <frontend_type>select</frontend_type>
199
+ <source_model>ewall_advancetag/source_type</source_model>
200
+ <sort_order>90</sort_order>
201
+ <show_in_default>1</show_in_default>
202
+ <show_in_website>1</show_in_website>
203
+ </type>
204
+ </fields>
205
+ </ewall_advancetag2>
206
+ </groups>
207
+ </admin>
208
+ </sections>
209
+ </config>
app/code/local/Ewall/Customtags/Block/Adminhtml/Customtags.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Ewall_Customtags_Block_Adminhtml_Customtags extends Mage_Adminhtml_Block_Widget_Grid_Container
3
+ {
4
+ public function __construct()
5
+ {
6
+ $this->_controller = 'adminhtml_customtags';
7
+ $this->_blockGroup = 'customtags';
8
+ $this->_headerText = Mage::helper('customtags')->__('Item Manager');
9
+ $this->_addButtonLabel = Mage::helper('customtags')->__('Add Item');
10
+ parent::__construct();
11
+ }
12
+ }
app/code/local/Ewall/Customtags/Block/Adminhtml/Customtags/Edit.php ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Ewall_Customtags_Block_Adminhtml_Customtags_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
4
+ {
5
+ public function __construct()
6
+ {
7
+ parent::__construct();
8
+
9
+ $this->_objectId = 'id';
10
+ $this->_blockGroup = 'customtags';
11
+ $this->_controller = 'adminhtml_customtags';
12
+
13
+ $this->_updateButton('save', 'label', Mage::helper('customtags')->__('Save Item'));
14
+ $this->_updateButton('delete', 'label', Mage::helper('customtags')->__('Delete Item'));
15
+
16
+ $this->_addButton('saveandcontinue', array(
17
+ 'label' => Mage::helper('adminhtml')->__('Save And Continue Edit'),
18
+ 'onclick' => 'saveAndContinueEdit()',
19
+ 'class' => 'save',
20
+ ), -100);
21
+
22
+ $this->_formScripts[] = "
23
+ function toggleEditor() {
24
+ if (tinyMCE.getInstanceById('customtags_content') == null) {
25
+ tinyMCE.execCommand('mceAddControl', false, 'customtags_content');
26
+ } else {
27
+ tinyMCE.execCommand('mceRemoveControl', false, 'customtags_content');
28
+ }
29
+ }
30
+
31
+ function saveAndContinueEdit(){
32
+ editForm.submit($('edit_form').action+'back/edit/');
33
+ }
34
+ ";
35
+ }
36
+
37
+ public function getHeaderText()
38
+ {
39
+ if( Mage::registry('customtags_data') && Mage::registry('customtags_data')->getId() ) {
40
+ return Mage::helper('customtags')->__("Edit Item '%s'", $this->htmlEscape(Mage::registry('customtags_data')->getTitle()));
41
+ } else {
42
+ return Mage::helper('customtags')->__('Add Item');
43
+ }
44
+ }
45
+ }
app/code/local/Ewall/Customtags/Block/Adminhtml/Customtags/Edit/Form.php ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Ewall_Customtags_Block_Adminhtml_Customtags_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
4
+ {
5
+ protected function _prepareForm()
6
+ {
7
+ $form = new Varien_Data_Form(array(
8
+ 'id' => 'edit_form',
9
+ 'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),
10
+ 'method' => 'post',
11
+ 'enctype' => 'multipart/form-data'
12
+ )
13
+ );
14
+
15
+ $form->setUseContainer(true);
16
+ $this->setForm($form);
17
+ return parent::_prepareForm();
18
+ }
19
+ }
app/code/local/Ewall/Customtags/Block/Adminhtml/Customtags/Edit/Tab/Form.php ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Ewall_Customtags_Block_Adminhtml_Customtags_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form
4
+ {
5
+ protected function _prepareForm()
6
+ {
7
+ $form = new Varien_Data_Form();
8
+ $this->setForm($form);
9
+ $fieldset = $form->addFieldset('customtags_form', array('legend'=>Mage::helper('customtags')->__('Item information')));
10
+
11
+ $fieldset->addField('title', 'text', array(
12
+ 'label' => Mage::helper('customtags')->__('Tag Name'),
13
+ 'class' => 'required-entry',
14
+ 'required' => true,
15
+ 'name' => 'title',
16
+ ));
17
+
18
+ $fieldset->addField('filename', 'text', array(
19
+ 'label' => Mage::helper('customtags')->__('Tag Url'),
20
+ 'class' => 'required-entry',
21
+ 'required' => true,
22
+ 'name' => 'filename',
23
+ ));
24
+
25
+ $fieldset->addField('status', 'select', array(
26
+ 'label' => Mage::helper('customtags')->__('Status'),
27
+ 'name' => 'status',
28
+ 'values' => array(
29
+ array(
30
+ 'value' => 'Enabled',
31
+ 'label' => Mage::helper('customtags')->__('Enabled'),
32
+ ),
33
+
34
+ array(
35
+ 'value' => 'Disabled',
36
+ 'label' => Mage::helper('customtags')->__('Disabled'),
37
+ ),
38
+ ),
39
+ ));
40
+
41
+ $fieldset->addField('content', 'text', array(
42
+ 'name' => 'content',
43
+ 'label' => Mage::helper('customtags')->__('Popularity'),
44
+ 'title' => Mage::helper('customtags')->__('Popularity'),
45
+ /* 'style' => 'width:700px; height:500px;',*/
46
+ 'wysiwyg' => false,
47
+ 'required' => true,
48
+ ));
49
+
50
+ if ( Mage::getSingleton('adminhtml/session')->getCustomtagsData() )
51
+ {
52
+ $form->setValues(Mage::getSingleton('adminhtml/session')->getCustomtagsData());
53
+ Mage::getSingleton('adminhtml/session')->setCustomtagsData(null);
54
+ } elseif ( Mage::registry('customtags_data') ) {
55
+ $form->setValues(Mage::registry('customtags_data')->getData());
56
+ }
57
+ return parent::_prepareForm();
58
+ }
59
+ }
app/code/local/Ewall/Customtags/Block/Adminhtml/Customtags/Edit/Tabs.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Ewall_Customtags_Block_Adminhtml_Customtags_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs
4
+ {
5
+
6
+ public function __construct()
7
+ {
8
+ parent::__construct();
9
+ $this->setId('customtags_tabs');
10
+ $this->setDestElementId('edit_form');
11
+ $this->setTitle(Mage::helper('customtags')->__('Item Information'));
12
+ }
13
+
14
+ protected function _beforeToHtml()
15
+ {
16
+ $this->addTab('form_section', array(
17
+ 'label' => Mage::helper('customtags')->__('Item Information'),
18
+ 'title' => Mage::helper('customtags')->__('Item Information'),
19
+ 'content' => $this->getLayout()->createBlock('customtags/adminhtml_customtags_edit_tab_form')->toHtml(),
20
+ ));
21
+
22
+ return parent::_beforeToHtml();
23
+ }
24
+ }
app/code/local/Ewall/Customtags/Block/Adminhtml/Customtags/Grid.php ADDED
@@ -0,0 +1,119 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Ewall_Customtags_Block_Adminhtml_Customtags_Grid extends Mage_Adminhtml_Block_Widget_Grid
4
+ {
5
+ public function __construct()
6
+ {
7
+ parent::__construct();
8
+ $this->setId('customtagsGrid');
9
+ $this->setDefaultSort('customtags_id');
10
+ $this->setDefaultDir('ASC');
11
+ $this->setSaveParametersInSession(true);
12
+ }
13
+
14
+ protected function _prepareCollection()
15
+ {
16
+ $collection = Mage::getModel('customtags/customtags')->getCollection();
17
+ $this->setCollection($collection);
18
+ return parent::_prepareCollection();
19
+ }
20
+
21
+ protected function _prepareColumns()
22
+ {
23
+ $this->addColumn('web_id', array(
24
+ 'header' => Mage::helper('customtags')->__('ID'),
25
+ 'align' =>'right',
26
+ 'width' => '50px',
27
+ 'index' => 'web_id',
28
+ ));
29
+
30
+ $this->addColumn('title', array(
31
+ 'header' => Mage::helper('customtags')->__('Tag'),
32
+ 'align' =>'left',
33
+ 'index' => 'title',
34
+ ));
35
+
36
+ $this->addColumn('filename', array(
37
+ 'header' => Mage::helper('customtags')->__('URL'),
38
+ 'align' =>'left',
39
+ 'index' => 'filename',
40
+ ));
41
+
42
+ $this->addColumn('content', array(
43
+ 'header' => Mage::helper('customtags')->__('Popularity'),
44
+ 'align' =>'left',
45
+ 'index' => 'content',
46
+ ));
47
+
48
+ $this->addColumn('status', array(
49
+ 'header' => Mage::helper('customtags')->__('Status'),
50
+ 'align' => 'left',
51
+ 'width' => '80px',
52
+ 'index' => 'status',
53
+ 'type' => 'options',
54
+ 'options' => array(
55
+ 1 => 'Enabled',
56
+ 2 => 'Disabled',
57
+ ),
58
+ ));
59
+
60
+ $this->addColumn('action',
61
+ array(
62
+ 'header' => Mage::helper('customtags')->__('Action'),
63
+ 'width' => '100',
64
+ 'type' => 'action',
65
+ 'getter' => 'getId',
66
+ 'actions' => array(
67
+ array(
68
+ 'caption' => Mage::helper('customtags')->__('Edit'),
69
+ 'url' => array('base'=> '*/*/edit'),
70
+ 'field' => 'id'
71
+ )
72
+ ),
73
+ 'filter' => false,
74
+ 'sortable' => false,
75
+ 'index' => 'stores',
76
+ 'is_system' => true,
77
+ ));
78
+
79
+
80
+
81
+ return parent::_prepareColumns();
82
+ }
83
+
84
+ protected function _prepareMassaction()
85
+ {
86
+ $this->setMassactionIdField('web_id');
87
+ $this->getMassactionBlock()->setFormFieldName('customtags');
88
+
89
+ $this->getMassactionBlock()->addItem('delete', array(
90
+ 'label' => Mage::helper('customtags')->__('Delete'),
91
+ 'url' => $this->getUrl('*/*/massDelete'),
92
+ 'confirm' => Mage::helper('customtags')->__('Are you sure?')
93
+ ));
94
+
95
+ $statuses = Mage::getSingleton('customtags/status')->getOptionArray();
96
+
97
+ array_unshift($statuses, array('label'=>'', 'value'=>''));
98
+ $this->getMassactionBlock()->addItem('status', array(
99
+ 'label'=> Mage::helper('customtags')->__('Change status'),
100
+ 'url' => $this->getUrl('*/*/massStatus', array('_current'=>true)),
101
+ 'additional' => array(
102
+ 'visibility' => array(
103
+ 'name' => 'status',
104
+ 'type' => 'select',
105
+ 'class' => 'required-entry',
106
+ 'label' => Mage::helper('customtags')->__('Status'),
107
+ 'values' => $statuses
108
+ )
109
+ )
110
+ ));
111
+ return $this;
112
+ }
113
+
114
+ public function getRowUrl($row)
115
+ {
116
+ return $this->getUrl('*/*/edit', array('id' => $row->getId()));
117
+ }
118
+
119
+ }
app/code/local/Ewall/Customtags/Block/Customtags.php ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Ewall_Customtags_Block_Customtags extends Mage_Core_Block_Template
3
+ {
4
+ public function _prepareLayout()
5
+ {
6
+ return parent::_prepareLayout();
7
+ }
8
+
9
+ public function getCustomtags()
10
+ {
11
+ if (!$this->hasData('customtags')) {
12
+ $this->setData('customtags', Mage::registry('customtags'));
13
+ }
14
+ return $this->getData('customtags');
15
+
16
+ }
17
+ public function getValues()
18
+ {
19
+ $prdct=Mage::getModel('customtags/customtags')->getCollection();
20
+ foreach ($prdct as $collection)
21
+ {
22
+ $var[]=$collection->getTitle();
23
+ $var[]=$collection->getFilename();
24
+ $var[]=$collection->getContent();
25
+ $var[]=$collection->getStatus();
26
+ }
27
+ return $var;
28
+
29
+ }
30
+ }
app/code/local/Ewall/Customtags/Helper/Data.php ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Ewall_Customtags_Helper_Data extends Mage_Core_Helper_Abstract
4
+ {
5
+
6
+ }
app/code/local/Ewall/Customtags/Model/Customtags.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Ewall_Customtags_Model_Customtags extends Mage_Core_Model_Abstract
4
+ {
5
+ public function _construct()
6
+ {
7
+ parent::_construct();
8
+ $this->_init('customtags/customtags');
9
+ }
10
+ }
app/code/local/Ewall/Customtags/Model/Mysql4/Customtags.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Ewall_Customtags_Model_Mysql4_Customtags extends Mage_Core_Model_Mysql4_Abstract
4
+ {
5
+ public function _construct()
6
+ {
7
+ // Note that the web_id refers to the key field in your database table.
8
+ $this->_init('customtags/customtags', 'web_id');
9
+ }
10
+ }
app/code/local/Ewall/Customtags/Model/Mysql4/Customtags/Collection.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Ewall_Customtags_Model_Mysql4_Customtags_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
4
+ {
5
+ public function _construct()
6
+ {
7
+ parent::_construct();
8
+ $this->_init('customtags/customtags');
9
+ }
10
+ }
app/code/local/Ewall/Customtags/Model/Status.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Ewall_Customtags_Model_Status extends Varien_Object
4
+ {
5
+ const STATUS_ENABLED = 1;
6
+ const STATUS_DISABLED = 2;
7
+
8
+ static public function getOptionArray()
9
+ {
10
+ return array(
11
+ self::STATUS_ENABLED => Mage::helper('customtags')->__('Enabled'),
12
+ self::STATUS_DISABLED => Mage::helper('customtags')->__('Disabled')
13
+ );
14
+ }
15
+ }
app/code/local/Ewall/Customtags/controllers/Adminhtml/CustomtagsController.php ADDED
@@ -0,0 +1,180 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Ewall_Customtags_Adminhtml_CustomtagsController extends Mage_Adminhtml_Controller_action
4
+ {
5
+
6
+ protected function _initAction() {
7
+ $this->loadLayout()
8
+ ->_setActiveMenu('customtags/items')
9
+ ->_addBreadcrumb(Mage::helper('adminhtml')->__('Items Manager'), Mage::helper('adminhtml')->__('Item Manager'));
10
+
11
+ return $this;
12
+ }
13
+
14
+ public function indexAction() {
15
+ $this->_initAction()
16
+ ->renderLayout();
17
+ }
18
+
19
+ public function editAction() {
20
+ $id = $this->getRequest()->getParam('id');
21
+ $model = Mage::getModel('customtags/customtags')->load($id);
22
+
23
+ if ($model->getId() || $id == 0) {
24
+ $data = Mage::getSingleton('adminhtml/session')->getFormData(true);
25
+ if (!empty($data)) {
26
+ $model->setData($data);
27
+ }
28
+
29
+ Mage::register('customtags_data', $model);
30
+
31
+ $this->loadLayout();
32
+ $this->_setActiveMenu('customtags/items');
33
+
34
+ $this->_addBreadcrumb(Mage::helper('adminhtml')->__('Item Manager'), Mage::helper('adminhtml')->__('Item Manager'));
35
+ $this->_addBreadcrumb(Mage::helper('adminhtml')->__('Item News'), Mage::helper('adminhtml')->__('Item News'));
36
+
37
+ $this->getLayout()->getBlock('head')->setCanLoadExtJs(true);
38
+
39
+ $this->_addContent($this->getLayout()->createBlock('customtags/adminhtml_customtags_edit'))
40
+ ->_addLeft($this->getLayout()->createBlock('customtags/adminhtml_customtags_edit_tabs'));
41
+
42
+ $this->renderLayout();
43
+ } else {
44
+ Mage::getSingleton('adminhtml/session')->addError(Mage::helper('customtags')->__('Item does not exist'));
45
+ $this->_redirect('*/*/');
46
+ }
47
+ }
48
+
49
+ public function newAction() {
50
+ $this->_forward('edit');
51
+ }
52
+
53
+ public function saveAction() {
54
+ if ($data = $this->getRequest()->getPost()) {
55
+
56
+ if(isset($_FILES['filename']['name']) && $_FILES['filename']['name'] != '') {
57
+ try {
58
+ /* Starting upload */
59
+ $uploader = new Varien_File_Uploader('filename');
60
+
61
+ // Any extention would work
62
+ $uploader->setAllowedExtensions(array('jpg','jpeg','gif','png'));
63
+ $uploader->setAllowRenameFiles(false);
64
+
65
+ // Set the file upload mode
66
+ // false -> get the file directly in the specified folder
67
+ // true -> get the file in the product like folders
68
+ // (file.jpg will go in something like /media/f/i/file.jpg)
69
+ $uploader->setFilesDispersion(false);
70
+
71
+ // We set media as the upload dir
72
+ $path = Mage::getBaseDir('media') . DS ;
73
+ $uploader->save($path, $_FILES['filename']['name'] );
74
+
75
+ } catch (Exception $e) {
76
+
77
+ }
78
+
79
+ //this way the name is saved in DB
80
+ $data['filename'] = $_FILES['filename']['name'];
81
+ }
82
+
83
+
84
+ $model = Mage::getModel('customtags/customtags');
85
+ $model->setData($data)
86
+ ->setId($this->getRequest()->getParam('id'));
87
+
88
+ try {
89
+ if ($model->getCreatedTime == NULL || $model->getUpdateTime() == NULL) {
90
+ $model->setCreatedTime(now())
91
+ ->setUpdateTime(now());
92
+ } else {
93
+ $model->setUpdateTime(now());
94
+ }
95
+
96
+ $model->save();
97
+ Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('customtags')->__('Item was successfully saved'));
98
+ Mage::getSingleton('adminhtml/session')->setFormData(false);
99
+
100
+ if ($this->getRequest()->getParam('back')) {
101
+ $this->_redirect('*/*/edit', array('id' => $model->getId()));
102
+ return;
103
+ }
104
+ $this->_redirect('*/*/');
105
+ return;
106
+ } catch (Exception $e) {
107
+ Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
108
+ Mage::getSingleton('adminhtml/session')->setFormData($data);
109
+ $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
110
+ return;
111
+ }
112
+ }
113
+ Mage::getSingleton('adminhtml/session')->addError(Mage::helper('customtags')->__('Unable to find item to save'));
114
+ $this->_redirect('*/*/');
115
+ }
116
+
117
+ public function deleteAction() {
118
+ if( $this->getRequest()->getParam('id') > 0 ) {
119
+ try {
120
+ $model = Mage::getModel('customtags/customtags');
121
+
122
+ $model->setId($this->getRequest()->getParam('id'))
123
+ ->delete();
124
+
125
+ Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('adminhtml')->__('Item was successfully deleted'));
126
+ $this->_redirect('*/*/');
127
+ } catch (Exception $e) {
128
+ Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
129
+ $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
130
+ }
131
+ }
132
+ $this->_redirect('*/*/');
133
+ }
134
+
135
+ public function massDeleteAction() {
136
+ $customtagsIds = $this->getRequest()->getParam('customtags');
137
+ if(!is_array($customtagsIds)) {
138
+ Mage::getSingleton('adminhtml/session')->addError(Mage::helper('adminhtml')->__('Please select item(s)'));
139
+ } else {
140
+ try {
141
+ foreach ($customtagsIds as $customtagsId) {
142
+ $customtags = Mage::getModel('customtags/customtags')->load($customtagsId);
143
+ $customtags->delete();
144
+ }
145
+ Mage::getSingleton('adminhtml/session')->addSuccess(
146
+ Mage::helper('adminhtml')->__(
147
+ 'Total of %d record(s) were successfully deleted', count($customtagsIds)
148
+ )
149
+ );
150
+ } catch (Exception $e) {
151
+ Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
152
+ }
153
+ }
154
+ $this->_redirect('*/*/index');
155
+ }
156
+
157
+ public function massStatusAction()
158
+ {
159
+ $customtagsIds = $this->getRequest()->getParam('customtags');
160
+ if(!is_array($customtagsIds)) {
161
+ Mage::getSingleton('adminhtml/session')->addError($this->__('Please select item(s)'));
162
+ } else {
163
+ try {
164
+ foreach ($customtagsIds as $customtagsId) {
165
+ $customtags = Mage::getSingleton('customtags/customtags')
166
+ ->load($customtagsId)
167
+ ->setStatus($this->getRequest()->getParam('status'))
168
+ ->setIsMassupdate(true)
169
+ ->save();
170
+ }
171
+ $this->_getSession()->addSuccess(
172
+ $this->__('Total of %d record(s) were successfully updated', count($customtagsIds))
173
+ );
174
+ } catch (Exception $e) {
175
+ $this->_getSession()->addError($e->getMessage());
176
+ }
177
+ }
178
+ $this->_redirect('*/*/index');
179
+ }
180
+ }
app/code/local/Ewall/Customtags/controllers/IndexController.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Ewall_Customtags_IndexController extends Mage_Core_Controller_Front_Action
3
+ {
4
+ public function indexAction()
5
+ {
6
+ $this->loadLayout();
7
+ $this->renderLayout();
8
+ }
9
+ }
app/code/local/Ewall/Customtags/etc/config.xml ADDED
@@ -0,0 +1,120 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Ewall_Customtags>
5
+ <version>0.1.0</version>
6
+ </Ewall_Customtags>
7
+ </modules>
8
+ <frontend>
9
+ <routers>
10
+ <customtags>
11
+ <use>standard</use>
12
+ <args>
13
+ <module>Ewall_Customtags</module>
14
+ <frontName>customtags</frontName>
15
+ </args>
16
+ </customtags>
17
+ </routers>
18
+ <layout>
19
+ <updates>
20
+ <customtags>
21
+ <file>customtags.xml</file>
22
+ </customtags>
23
+ </updates>
24
+ </layout>
25
+ </frontend>
26
+ <admin>
27
+ <routers>
28
+ <customtags>
29
+ <use>admin</use>
30
+ <args>
31
+ <module>Ewall_Customtags</module>
32
+ <frontName>customtags</frontName>
33
+ </args>
34
+ </customtags>
35
+ </routers>
36
+ </admin>
37
+ <adminhtml>
38
+ <menu>
39
+ <customtags module="customtags">
40
+ <title>Customtags</title>
41
+ <sort_order>71</sort_order>
42
+ <children>
43
+ <items module="customtags">
44
+ <title>Manage Items</title>
45
+ <sort_order>0</sort_order>
46
+ <action>customtags/adminhtml_customtags</action>
47
+ </items>
48
+ </children>
49
+ </customtags>
50
+ </menu>
51
+ <acl>
52
+ <resources>
53
+ <all>
54
+ <title>Allow Everything</title>
55
+ </all>
56
+ <admin>
57
+ <children>
58
+ <Ewall_Customtags>
59
+ <title>Customtags Module</title>
60
+ <sort_order>10</sort_order>
61
+ </Ewall_Customtags>
62
+ </children>
63
+ </admin>
64
+ </resources>
65
+ </acl>
66
+ <layout>
67
+ <updates>
68
+ <customtags>
69
+ <file>customtags.xml</file>
70
+ </customtags>
71
+ </updates>
72
+ </layout>
73
+ </adminhtml>
74
+ <global>
75
+ <models>
76
+ <customtags>
77
+ <class>Ewall_Customtags_Model</class>
78
+ <resourceModel>customtags_mysql4</resourceModel>
79
+ </customtags>
80
+ <customtags_mysql4>
81
+ <class>Ewall_Customtags_Model_Mysql4</class>
82
+ <entities>
83
+ <customtags>
84
+ <table>customtags</table>
85
+ </customtags>
86
+ </entities>
87
+ </customtags_mysql4>
88
+ </models>
89
+ <resources>
90
+ <customtags_setup>
91
+ <setup>
92
+ <module>Ewall_Customtags</module>
93
+ </setup>
94
+ <connection>
95
+ <use>core_setup</use>
96
+ </connection>
97
+ </customtags_setup>
98
+ <customtags_write>
99
+ <connection>
100
+ <use>core_write</use>
101
+ </connection>
102
+ </customtags_write>
103
+ <customtags_read>
104
+ <connection>
105
+ <use>core_read</use>
106
+ </connection>
107
+ </customtags_read>
108
+ </resources>
109
+ <blocks>
110
+ <customtags>
111
+ <class>Ewall_Customtags_Block</class>
112
+ </customtags>
113
+ </blocks>
114
+ <helpers>
115
+ <customtags>
116
+ <class>Ewall_Customtags_Helper</class>
117
+ </customtags>
118
+ </helpers>
119
+ </global>
120
+ </config>
app/code/local/Ewall/Customtags/sql/customtags_setup/mysql4-install-0.1.0.php ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $installer = $this;
4
+
5
+ $installer->startSetup();
6
+
7
+ $installer->run("
8
+
9
+ -- DROP TABLE IF EXISTS {$this->getTable('customtags')};
10
+ CREATE TABLE {$this->getTable('customtags')} (
11
+ `web_id` int(11) unsigned NOT NULL auto_increment,
12
+ `title` varchar(255) NOT NULL default '',
13
+ `filename` varchar(255) NOT NULL default '',
14
+ `content` text NOT NULL default '',
15
+ `status` varchar(255) NOT NULL default '',
16
+ `created_time` datetime NULL,
17
+ `update_time` datetime NULL,
18
+ PRIMARY KEY (`web_id`)
19
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
20
+
21
+ ");
22
+
23
+ $installer->endSetup();
app/design/adminhtml/default/default/layout/customtags.xml ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout version="0.1.0">
3
+ <customtags_adminhtml_customtags_index>
4
+ <reference name="content">
5
+ <block type="customtags/adminhtml_customtags" name="customtags" />
6
+ </reference>
7
+ </customtags_adminhtml_customtags_index>
8
+ </layout>
app/design/frontend/default/default/layout/advancetag.xml ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--<layout version="0.1.0">
3
+ <block type="core/text_list" name="left" as="left" translate="label">
4
+ <label>Left Column</label>
5
+ <block type="tag/popular" name="tags_popular" template="tag/popular.phtml" />
6
+ </block>
7
+ </layout> -->
app/design/frontend/default/default/layout/customtags.xml ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout version="0.1.0">
3
+ <default>
4
+ </default>
5
+ <customtags_index_index>
6
+ <reference name="content">
7
+ <block type="customtags/customtags" name="customtags" template="customtags/customtags.phtml" />
8
+ </reference>
9
+ </customtags_index_index>
10
+ </layout>
app/design/frontend/default/default/layout/tag.xml ADDED
@@ -0,0 +1,134 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Academic Free License (AFL 3.0)
9
+ * that is bundled with this package in the file LICENSE_AFL.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/afl-3.0.php
12
+ * If you did not receive a copy of the license and are unable to
13
+ * obtain it through the world-wide-web, please send an email
14
+ * to license@magentocommerce.com so we can send you a copy immediately.
15
+ *
16
+ * DISCLAIMER
17
+ *
18
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
19
+ * versions in the future. If you wish to customize Magento for your
20
+ * needs please refer to http://www.magentocommerce.com for more information.
21
+ *
22
+ * @category design
23
+ * @package base_default
24
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
25
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
+ */
27
+
28
+ -->
29
+ <layout version="0.1.0">
30
+
31
+ <!--
32
+ Default layout, loads most of the pages
33
+ -->
34
+
35
+ <default>
36
+ <!-- Mage_Tag -->
37
+ <reference name="left">
38
+ <block type="advancetag/flashtag" name="tags_popular" template="advancetag/smallflashtag.phtml" />
39
+ </reference>
40
+ </default>
41
+
42
+
43
+ <!--
44
+ Customer account pages, rendered for all tabs in dashboard
45
+ -->
46
+
47
+ <customer_account>
48
+ <!-- Mage_Tag -->
49
+ <reference name="customer_account_navigation">
50
+ <action method="addLink" translate="label" module="tag"><name>tags</name><path>tag/customer/</path><label>My Tags</label></action>
51
+ </reference>
52
+ </customer_account>
53
+
54
+ <!--
55
+ Customer account home dashboard layout
56
+ -->
57
+
58
+ <customer_account_index>
59
+ <!-- Mage_Tag -->
60
+ <reference name="customer_account_dashboard">
61
+ <action method="unsetChild"><name>customer_account_dashboard_info2</name></action>
62
+ <block type="tag/customer_recent" name="customer_account_dashboard_info2" as="info2" template="tag/customer/recent.phtml"/>
63
+ </reference>
64
+ </customer_account_index>
65
+
66
+ <catalog_product_view translate="label">
67
+ <label>Catalog Product View</label>
68
+ <!-- Mage_Tag -->
69
+ <reference name="product.info.additional">
70
+ <block type="tag/product_list" name="product_tag_list" before="-" template="tag/list.phtml">
71
+ <block type="page/html_wrapper" name="product.tag.list.list.before" as="list_before" translate="label">
72
+ <label>Tags List Before</label>
73
+ <action method="setMayBeInvisible"><value>1</value></action>
74
+ </block>
75
+ </block>
76
+ </reference>
77
+ </catalog_product_view>
78
+
79
+ <!--
80
+ All tags page
81
+ -->
82
+
83
+ <tag_list_index translate="label">
84
+ <label>Tags List (All Available)</label>
85
+ <!-- Mage_Tag -->
86
+ <reference name="root">
87
+ <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
88
+ </reference>
89
+ <reference name="content">
90
+ <block type="advancetag/flashtag" name="tags_popular" as="flashtag" template="advancetag/flashtag.phtml" />
91
+ </reference>
92
+ </tag_list_index>
93
+
94
+ <tag_product_list translate="label">
95
+ <label>Tagged Products List</label>
96
+ <!-- Mage_Tag -->
97
+ <reference name="content">
98
+ <block type="tag/product_result" name="tag_products" template="catalogsearch/result.phtml">
99
+ <block type="catalog/product_list" name="search_result_list" template="catalog/product/list.phtml">
100
+ <block type="catalog/product_list_toolbar" name="product_list_toolbar" template="catalog/product/list/toolbar.phtml">
101
+ <block type="page/html_pager" name="product_list_toolbar_pager"/>
102
+ </block>
103
+ <action method="setToolbarBlockName"><name>product_list_toolbar</name></action>
104
+ </block>
105
+ <action method="setListOrders"/>
106
+ <action method="setListModes"/>
107
+ <action method="setListCollection"/>
108
+ </block>
109
+ </reference>
110
+ </tag_product_list>
111
+
112
+ <tag_customer_index translate="label">
113
+ <label>Customer My Account My Tags List</label>
114
+ <update handle="customer_account"/>
115
+ <reference name="root">
116
+ <action method="setHeaderTitle" translate="title" module="customer"><title>My Account</title></action>
117
+ </reference>
118
+ <reference name="my.account.wrapper">
119
+ <block type="tag/customer_tags" name="customer_tags" template="tag/customer/tags.phtml"/>
120
+ </reference>
121
+ </tag_customer_index>
122
+
123
+ <tag_customer_view translate="label">
124
+ <label>Customer My Account Tag View</label>
125
+ <update handle="customer_account"/>
126
+ <reference name="root">
127
+ <action method="setHeaderTitle" translate="title" module="customer"><title>My Account</title></action>
128
+ </reference>
129
+ <reference name="my.account.wrapper">
130
+ <block type="tag/customer_view" name="customer_view" template="tag/customer/view.phtml"/>
131
+ </reference>
132
+ </tag_customer_view>
133
+
134
+ </layout>
app/design/frontend/default/default/template/advancetag/flashtag.phtml ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if(Mage::getStoreConfig("admin/ewall_advancetag/isdisplay")==1){?>
2
+ <div class="box base-mini mini-product-tags">
3
+ <div class="head">
4
+ <h4><?php echo $this->__('All Tags'); ?></h4>
5
+ </div>
6
+ <div class="content">
7
+ <?php //if(Mage::getStoreConfig("admin/bysoft_advancetag/isdisplay")==1){?>
8
+ <?php echo $this->getFlashTag(1); //1 is for all tags list(big blcok);2 is for small block?>
9
+ </div>
10
+ <div class="actions">
11
+ <a href="<?php echo $this->getUrl('tag/list') ?>"><small><?php echo $this->__('View All Tags') ?></small></a>
12
+ </div>
13
+ </div>
14
+ <?php }else{?>
15
+ <?php //echo $this->getLayout()->createBlock('tag/popular')->setTemplate('tag/popular.phtml')->toHtml(); ?>
16
+ <div class="page-title">
17
+ <h1><?php echo $this->__('All Tags') ?></h1>
18
+ </div>
19
+ <?php if( sizeof($this->getTags()) > 0 ) { ?>
20
+ <ul class="tags-list">
21
+ <?php foreach ($this->_getTags(100) as $_tag): ?>
22
+ <li><a href="<?php echo $_tag->getTaggedProductsUrl() ?>" style="font-size:<?php echo $_tag->getRatio()*70+75 ?>%;"><?php echo $this->htmlEscape($_tag->getName()) ?></a></li>
23
+ <?php endforeach; ?>
24
+ </ul>
25
+ <?php }?><?php }?>
26
+
27
+
app/design/frontend/default/default/template/advancetag/smallflashtag.phtml ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if(Mage::getStoreConfig("admin/ewall_advancetag2/isdisplay")==1){?>
2
+ <div class="box base-mini mini-product-tags">
3
+ <div class="head">
4
+ <h4><?php echo $this->__('Popular Tags'); ?></h4>
5
+ </div>
6
+ <div class="content">
7
+ <?php //if(Mage::getStoreConfig("admin/bysoft_advancetag2/isdisplay")==1){?>
8
+ <?php echo $this->getFlashTag(2); //1 is for all tags list(big blcok);2 is for small block?>
9
+ </div>
10
+ <div class="actions">
11
+ <a href="<?php echo $this->getUrl('tag/list') ?>"><small><?php echo $this->__('View All Tags') ?></small></a>
12
+ </div>
13
+ </div>
14
+
15
+ <?php } else { ?>
16
+
17
+ <?php //echo($this->getChildHtml('left')); ?>
18
+ <?php echo $this->getLayout()->createBlock('tag/popular')->setTemplate('tag/popular.phtml')->toHtml(); ?>
19
+
20
+ <ul style="display:none;">
21
+ <?php foreach ($this->getTags() as $_tag): ?>
22
+ <li><a href="<?php echo $_tag->getTaggedProductsUrl() ?>" style="font-size:<?php echo $_tag->getRatio()*70+75 ?>%;"><?php echo $this->htmlEscape($_tag->getName()) ?></a></li>
23
+ <?php endforeach; ?>
24
+ </ul>
25
+ <?php }?>
26
+
app/design/frontend/default/default/template/customtags/customtags.phtml ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $_coreHelper = $this->helper('core');
3
+ ?>
4
+ <?php
5
+ $var = $this->getvalues();
6
+ foreach($var as $var1) {
7
+ $g=explode (",",$var1);
8
+ for($i=0;$i<count($g);$i++) {
9
+ print_r($g[$i]);
10
+ echo "<br />";
11
+ }
12
+ }
13
+ ?>
app/etc/modules/Ewall_Advancetag .xml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Ewall_Advancetag>
5
+ <active>true</active>
6
+ <codePool>local</codePool>
7
+ </Ewall_Advancetag>
8
+ </modules>
9
+ </config>
app/etc/modules/Ewall_Customtags.xml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Ewall_Customtags>
5
+ <active>true</active>
6
+ <codePool>local</codePool>
7
+ </Ewall_Customtags>
8
+ </modules>
9
+ </config>
js/advancetag/swfobject.js ADDED
@@ -0,0 +1,133 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * SWFObject v1.4: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
3
+ *
4
+ * SWFObject is (c) 2006 Geoff Stearns and is released under the MIT License:
5
+ * http://www.opensource.org/licenses/mit-license.php
6
+ *
7
+ * **SWFObject is the SWF embed script formarly known as FlashObject. The name was changed for
8
+ * legal reasons.
9
+ */
10
+ if(typeof deconcept=="undefined"){var deconcept=new Object();}
11
+ if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}
12
+ if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}
13
+ deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a,_b){
14
+ if(!document.createElement||!document.getElementById){return;}
15
+ this.DETECT_KEY=_b?_b:"detectflash";
16
+ this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);
17
+ this.params=new Object();
18
+ this.variables=new Object();
19
+ this.attributes=new Array();
20
+ if(_1){this.setAttribute("swf",_1);}
21
+ if(id){this.setAttribute("id",id);}
22
+ if(w){this.setAttribute("width",w);}
23
+ if(h){this.setAttribute("height",h);}
24
+ if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}
25
+ this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion(this.getAttribute("version"),_7);
26
+ if(c){this.addParam("bgcolor",c);}
27
+ var q=_8?_8:"high";
28
+ this.addParam("quality",q);
29
+ this.setAttribute("useExpressInstall",_7);
30
+ this.setAttribute("doExpressInstall",false);
31
+ var _d=(_9)?_9:window.location;
32
+ this.setAttribute("xiRedirectUrl",_d);
33
+ this.setAttribute("redirectUrl","");
34
+ if(_a){this.setAttribute("redirectUrl",_a);}};
35
+ deconcept.SWFObject.prototype={setAttribute:function(_e,_f){
36
+ this.attributes[_e]=_f;
37
+ },getAttribute:function(_10){
38
+ return this.attributes[_10];
39
+ },addParam:function(_11,_12){
40
+ this.params[_11]=_12;
41
+ },getParams:function(){
42
+ return this.params;
43
+ },addVariable:function(_13,_14){
44
+ this.variables[_13]=_14;
45
+ },getVariable:function(_15){
46
+ return this.variables[_15];
47
+ },getVariables:function(){
48
+ return this.variables;
49
+ },getVariablePairs:function(){
50
+ var _16=new Array();
51
+ var key;
52
+ var _18=this.getVariables();
53
+ for(key in _18){
54
+ _16.push(key+"="+_18[key]);}
55
+ return _16;
56
+ },getSWFHTML:function(){
57
+ var _19="";
58
+ if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){
59
+ if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");}
60
+ _19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\"";
61
+ _19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";
62
+ var _1a=this.getParams();
63
+ for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}
64
+ var _1c=this.getVariablePairs().join("&");
65
+ if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}
66
+ _19+="/>";
67
+ }else{
68
+ if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");}
69
+ _19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\">";
70
+ _19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";
71
+ var _1d=this.getParams();
72
+ for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}
73
+ var _1f=this.getVariablePairs().join("&");
74
+ if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}
75
+ _19+="</object>";}
76
+ return _19;
77
+ },write:function(_20){
78
+ if(this.getAttribute("useExpressInstall")){
79
+ var _21=new deconcept.PlayerVersion([6,0,65]);
80
+ if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){
81
+ this.setAttribute("doExpressInstall",true);
82
+ this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));
83
+ document.title=document.title.slice(0,47)+" - Flash Player Installation";
84
+ this.addVariable("MMdoctitle",document.title);}}
85
+ if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){
86
+ var n=(typeof _20=="string")?document.getElementById(_20):_20;
87
+ n.innerHTML=this.getSWFHTML();
88
+ return true;
89
+ }else{
90
+ if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}
91
+ return false;}};
92
+ deconcept.SWFObjectUtil.getPlayerVersion=function(_23,_24){
93
+ var _25=new deconcept.PlayerVersion([0,0,0]);
94
+ if(navigator.plugins&&navigator.mimeTypes.length){
95
+ var x=navigator.plugins["Shockwave Flash"];
96
+ if(x&&x.description){_25=new deconcept.PlayerVersion(x.description.replace(/([a-z]|[A-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}
97
+ }else{try{
98
+ var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
99
+ for(var i=3;axo!=null;i++){
100
+ axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+i);
101
+ _25=new deconcept.PlayerVersion([i,0,0]);}}
102
+ catch(e){}
103
+ if(_23&&_25.major>_23.major){return _25;}
104
+ if(!_23||((_23.minor!=0||_23.rev!=0)&&_25.major==_23.major)||_25.major!=6||_24){
105
+ try{_25=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}
106
+ catch(e){}}}
107
+ return _25;};
108
+ deconcept.PlayerVersion=function(_29){
109
+ this.major=parseInt(_29[0])!=null?parseInt(_29[0]):0;
110
+ this.minor=parseInt(_29[1])||0;
111
+ this.rev=parseInt(_29[2])||0;};
112
+ deconcept.PlayerVersion.prototype.versionIsValid=function(fv){
113
+ if(this.major<fv.major){return false;}
114
+ if(this.major>fv.major){return true;}
115
+ if(this.minor<fv.minor){return false;}
116
+ if(this.minor>fv.minor){return true;}
117
+ if(this.rev<fv.rev){return false;}return true;};
118
+ deconcept.util={getRequestParameter:function(_2b){
119
+ var q=document.location.search||document.location.hash;
120
+ if(q){
121
+ var _2d=q.indexOf(_2b+"=");
122
+ var _2e=(q.indexOf("&",_2d)>-1)?q.indexOf("&",_2d):q.length;
123
+ if(q.length>1&&_2d>-1){
124
+ return q.substring(q.indexOf("=",_2d)+1,_2e);
125
+ }}return "";}};
126
+ if(Array.prototype.push==null){
127
+ Array.prototype.push=function(_2f){
128
+ this[this.length]=_2f;
129
+ return this.length;};}
130
+ var getQueryParamValue=deconcept.util.getRequestParameter;
131
+ var FlashObject=deconcept.SWFObject; // for backwards compatibility
132
+ var SWFObject=deconcept.SWFObject;
133
+
js/advancetag/tagcloud.swf ADDED
Binary file
package.xml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>Ewall_Customtags</name>
4
+ <version>1.0.0</version>
5
+ <stability>stable</stability>
6
+ <license>Open Software License (OSL)</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>The extension will display the tags cloud in 3D format and also the ability to add the custom tags in admin.</summary>
10
+ <description>The extension will display the tags cloud in 3D format and also the ability to add the custom tags in admin.</description>
11
+ <notes>This is the first version of the extension</notes>
12
+ <authors><author><name>Ewallsolutions</name><user>ewallsolutions</user><email>support@ewallsolutions.com</email></author></authors>
13
+ <date>2013-03-05</date>
14
+ <time>04:32:59</time>
15
+ <contents><target name="mageetc"><dir name="modules"><file name="Ewall_Customtags.xml" hash="8297747b772e7b1686ed241429544fe4"/><file name="Ewall_Advancetag .xml" hash="c14a722e740b61b55c86fc3242b09e32"/></dir></target><target name="magelocal"><dir name="Ewall"><dir name="Customtags"><dir name="Block"><dir name="Adminhtml"><dir name="Customtags"><dir name="Edit"><file name="Form.php" hash="6281c8c8291ea8d32f3eb29554c6eaba"/><dir name="Tab"><file name="Form.php" hash="6ed41d76a2fe9d47f480197a87ce300c"/></dir><file name="Tabs.php" hash="f5cee7758051a4530fc916587085fb8b"/></dir><file name="Edit.php" hash="4428d1fdd5a645c006a2068e4b0fa262"/><file name="Grid.php" hash="66b4775e3064551815783f219cf241cc"/></dir><file name="Customtags.php" hash="83606e16a405ddcd5bbff0fdeed3059a"/></dir><file name="Customtags.php" hash="ad45329cb496dee60ca187453b2b7b0a"/></dir><dir name="Helper"><file name="Data.php" hash="081f33f36a2a8ce38f53a4d3409db979"/></dir><dir name="Model"><file name="Customtags.php" hash="f2b23e65dd0101ce462edb60f8bc9d9e"/><dir name="Mysql4"><dir name="Customtags"><file name="Collection.php" hash="576bdd3ad01684f026739e6fbffb2b1a"/></dir><file name="Customtags.php" hash="57526e2a688668bb88c52efc2e30836d"/></dir><file name="Status.php" hash="12eec22f06e7e443472e96ffc7120fd2"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="CustomtagsController.php" hash="5a9c17a6e0e5a56fb1ab11766e6b4480"/></dir><file name="IndexController.php" hash="5e72774f1c6a130a26b50edbfab27735"/></dir><dir name="etc"><file name="config.xml" hash="862226cae95fb6f97207abf8ec8a707c"/></dir><dir name="sql"><dir name="customtags_setup"><file name="mysql4-install-0.1.0.php" hash="d6921bb0ae6bbe77532ee573bf650dee"/></dir></dir></dir><dir name="Advancetag"><dir name="Block"><file name="Flashtag.php" hash="f8e61cb696e22c32658a24d17a9e691e"/></dir><dir name="Helper"><file name="Data.php" hash="3632733f0735adcf5d82c4e8f060e0d0"/></dir><dir name="Model"><dir name="Source"><file name="Type.php" hash="d665882e2d5a850431ed11707ed76284"/></dir></dir><dir name="etc"><file name="config.xml" hash="4a3bdbd3ef6855f3cc7f395a36ddb20d"/><file name="system.xml" hash="6978fab9c4e86a3fe2162e4bf1df959b"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="tag.xml" hash="4f7ae931bfe0f45ba928e61741e4b54c"/><file name="customtags.xml" hash="45740fe615cd41dc74559d6ef3b1889e"/><file name="advancetag.xml" hash="e4456090e39c4d5dd23e46f68e3b011f"/></dir><dir name="template"><dir name="advancetag"><file name="flashtag.phtml" hash="e2605d6721d30485633f311a7149be09"/><file name="smallflashtag.phtml" hash="2de16b9edebde03100442719b8eb0307"/></dir><dir name="customtags"><file name="customtags.phtml" hash="b9293f5752b2f34779cfae7f24468647"/></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="customtags.xml" hash="a9ebddc2163f7b8847f6604355d526c6"/></dir></dir></dir></dir></target><target name="mageweb"><dir name="js"><dir name="advancetag"><file name="swfobject.js" hash="7759b4bbadb815c999f6963e423e834a"/><file name="tagcloud.swf" hash="3e3b88a96bcb32d1608b192f33d5a4d8"/></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="default"><dir name="default"><dir name="js"><file name="swfobject21.js" hash="eaa5417940c71f441b016b12c534665d"/></dir></dir></dir></dir></target></contents>
16
+ <compatible/>
17
+ <dependencies><required><php><min>5.2.13</min><max>5.3.15</max></php></required></dependencies>
18
+ </package>
skin/frontend/default/default/js/swfobject21.js ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ /* SWFObject v2.1 <http://code.google.com/p/swfobject/>
2
+ Copyright (c) 2007-2008 Geoff Stearns, Michael Williams, and Bobby van der Sluis
3
+ This software is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
4
+ */
5
+ var swfobject=function(){var b="undefined",Q="object",n="Shockwave Flash",p="ShockwaveFlash.ShockwaveFlash",P="application/x-shockwave-flash",m="SWFObjectExprInst",j=window,K=document,T=navigator,o=[],N=[],i=[],d=[],J,Z=null,M=null,l=null,e=false,A=false;var h=function(){var v=typeof K.getElementById!=b&&typeof K.getElementsByTagName!=b&&typeof K.createElement!=b,AC=[0,0,0],x=null;if(typeof T.plugins!=b&&typeof T.plugins[n]==Q){x=T.plugins[n].description;if(x&&!(typeof T.mimeTypes!=b&&T.mimeTypes[P]&&!T.mimeTypes[P].enabledPlugin)){x=x.replace(/^.*\s+(\S+\s+\S+$)/,"$1");AC[0]=parseInt(x.replace(/^(.*)\..*$/,"$1"),10);AC[1]=parseInt(x.replace(/^.*\.(.*)\s.*$/,"$1"),10);AC[2]=/r/.test(x)?parseInt(x.replace(/^.*r(.*)$/,"$1"),10):0}}else{if(typeof j.ActiveXObject!=b){var y=null,AB=false;try{y=new ActiveXObject(p+".7")}catch(t){try{y=new ActiveXObject(p+".6");AC=[6,0,21];y.AllowScriptAccess="always"}catch(t){if(AC[0]==6){AB=true}}if(!AB){try{y=new ActiveXObject(p)}catch(t){}}}if(!AB&&y){try{x=y.GetVariable("$version");if(x){x=x.split(" ")[1].split(",");AC=[parseInt(x[0],10),parseInt(x[1],10),parseInt(x[2],10)]}}catch(t){}}}}var AD=T.userAgent.toLowerCase(),r=T.platform.toLowerCase(),AA=/webkit/.test(AD)?parseFloat(AD.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,q=false,z=r?/win/.test(r):/win/.test(AD),w=r?/mac/.test(r):/mac/.test(AD);/*@cc_on q=true;@if(@_win32)z=true;@elif(@_mac)w=true;@end@*/return{w3cdom:v,pv:AC,webkit:AA,ie:q,win:z,mac:w}}();var L=function(){if(!h.w3cdom){return }f(H);if(h.ie&&h.win){try{K.write("<script id=__ie_ondomload defer=true src=//:><\/script>");J=C("__ie_ondomload");if(J){I(J,"onreadystatechange",S)}}catch(q){}}if(h.webkit&&typeof K.readyState!=b){Z=setInterval(function(){if(/loaded|complete/.test(K.readyState)){E()}},10)}if(typeof K.addEventListener!=b){K.addEventListener("DOMContentLoaded",E,null)}R(E)}();function S(){if(J.readyState=="complete"){J.parentNode.removeChild(J);E()}}function E(){if(e){return }if(h.ie&&h.win){var v=a("span");try{var u=K.getElementsByTagName("body")[0].appendChild(v);u.parentNode.removeChild(u)}catch(w){return }}e=true;if(Z){clearInterval(Z);Z=null}var q=o.length;for(var r=0;r<q;r++){o[r]()}}function f(q){if(e){q()}else{o[o.length]=q}}function R(r){if(typeof j.addEventListener!=b){j.addEventListener("load",r,false)}else{if(typeof K.addEventListener!=b){K.addEventListener("load",r,false)}else{if(typeof j.attachEvent!=b){I(j,"onload",r)}else{if(typeof j.onload=="function"){var q=j.onload;j.onload=function(){q();r()}}else{j.onload=r}}}}}function H(){var t=N.length;for(var q=0;q<t;q++){var u=N[q].id;if(h.pv[0]>0){var r=C(u);if(r){N[q].width=r.getAttribute("width")?r.getAttribute("width"):"0";N[q].height=r.getAttribute("height")?r.getAttribute("height"):"0";if(c(N[q].swfVersion)){if(h.webkit&&h.webkit<312){Y(r)}W(u,true)}else{if(N[q].expressInstall&&!A&&c("6.0.65")&&(h.win||h.mac)){k(N[q])}else{O(r)}}}}else{W(u,true)}}}function Y(t){var q=t.getElementsByTagName(Q)[0];if(q){var w=a("embed"),y=q.attributes;if(y){var v=y.length;for(var u=0;u<v;u++){if(y[u].nodeName=="DATA"){w.setAttribute("src",y[u].nodeValue)}else{w.setAttribute(y[u].nodeName,y[u].nodeValue)}}}var x=q.childNodes;if(x){var z=x.length;for(var r=0;r<z;r++){if(x[r].nodeType==1&&x[r].nodeName=="PARAM"){w.setAttribute(x[r].getAttribute("name"),x[r].getAttribute("value"))}}}t.parentNode.replaceChild(w,t)}}function k(w){A=true;var u=C(w.id);if(u){if(w.altContentId){var y=C(w.altContentId);if(y){M=y;l=w.altContentId}}else{M=G(u)}if(!(/%$/.test(w.width))&&parseInt(w.width,10)<310){w.width="310"}if(!(/%$/.test(w.height))&&parseInt(w.height,10)<137){w.height="137"}K.title=K.title.slice(0,47)+" - Flash Player Installation";var z=h.ie&&h.win?"ActiveX":"PlugIn",q=K.title,r="MMredirectURL="+j.location+"&MMplayerType="+z+"&MMdoctitle="+q,x=w.id;if(h.ie&&h.win&&u.readyState!=4){var t=a("div");x+="SWFObjectNew";t.setAttribute("id",x);u.parentNode.insertBefore(t,u);u.style.display="none";var v=function(){u.parentNode.removeChild(u)};I(j,"onload",v)}U({data:w.expressInstall,id:m,width:w.width,height:w.height},{flashvars:r},x)}}function O(t){if(h.ie&&h.win&&t.readyState!=4){var r=a("div");t.parentNode.insertBefore(r,t);r.parentNode.replaceChild(G(t),r);t.style.display="none";var q=function(){t.parentNode.removeChild(t)};I(j,"onload",q)}else{t.parentNode.replaceChild(G(t),t)}}function G(v){var u=a("div");if(h.win&&h.ie){u.innerHTML=v.innerHTML}else{var r=v.getElementsByTagName(Q)[0];if(r){var w=r.childNodes;if(w){var q=w.length;for(var t=0;t<q;t++){if(!(w[t].nodeType==1&&w[t].nodeName=="PARAM")&&!(w[t].nodeType==8)){u.appendChild(w[t].cloneNode(true))}}}}}return u}function U(AG,AE,t){var q,v=C(t);if(v){if(typeof AG.id==b){AG.id=t}if(h.ie&&h.win){var AF="";for(var AB in AG){if(AG[AB]!=Object.prototype[AB]){if(AB.toLowerCase()=="data"){AE.movie=AG[AB]}else{if(AB.toLowerCase()=="styleclass"){AF+=' class="'+AG[AB]+'"'}else{if(AB.toLowerCase()!="classid"){AF+=" "+AB+'="'+AG[AB]+'"'}}}}}var AD="";for(var AA in AE){if(AE[AA]!=Object.prototype[AA]){AD+='<param name="'+AA+'" value="'+AE[AA]+'" />'}}v.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+AF+">"+AD+"</object>";i[i.length]=AG.id;q=C(AG.id)}else{if(h.webkit&&h.webkit<312){var AC=a("embed");AC.setAttribute("type",P);for(var z in AG){if(AG[z]!=Object.prototype[z]){if(z.toLowerCase()=="data"){AC.setAttribute("src",AG[z])}else{if(z.toLowerCase()=="styleclass"){AC.setAttribute("class",AG[z])}else{if(z.toLowerCase()!="classid"){AC.setAttribute(z,AG[z])}}}}}for(var y in AE){if(AE[y]!=Object.prototype[y]){if(y.toLowerCase()!="movie"){AC.setAttribute(y,AE[y])}}}v.parentNode.replaceChild(AC,v);q=AC}else{var u=a(Q);u.setAttribute("type",P);for(var x in AG){if(AG[x]!=Object.prototype[x]){if(x.toLowerCase()=="styleclass"){u.setAttribute("class",AG[x])}else{if(x.toLowerCase()!="classid"){u.setAttribute(x,AG[x])}}}}for(var w in AE){if(AE[w]!=Object.prototype[w]&&w.toLowerCase()!="movie"){F(u,w,AE[w])}}v.parentNode.replaceChild(u,v);q=u}}}return q}function F(t,q,r){var u=a("param");u.setAttribute("name",q);u.setAttribute("value",r);t.appendChild(u)}function X(r){var q=C(r);if(q&&(q.nodeName=="OBJECT"||q.nodeName=="EMBED")){if(h.ie&&h.win){if(q.readyState==4){B(r)}else{j.attachEvent("onload",function(){B(r)})}}else{q.parentNode.removeChild(q)}}}function B(t){var r=C(t);if(r){for(var q in r){if(typeof r[q]=="function"){r[q]=null}}r.parentNode.removeChild(r)}}function C(t){var q=null;try{q=K.getElementById(t)}catch(r){}return q}function a(q){return K.createElement(q)}function I(t,q,r){t.attachEvent(q,r);d[d.length]=[t,q,r]}function c(t){var r=h.pv,q=t.split(".");q[0]=parseInt(q[0],10);q[1]=parseInt(q[1],10)||0;q[2]=parseInt(q[2],10)||0;return(r[0]>q[0]||(r[0]==q[0]&&r[1]>q[1])||(r[0]==q[0]&&r[1]==q[1]&&r[2]>=q[2]))?true:false}function V(v,r){if(h.ie&&h.mac){return }var u=K.getElementsByTagName("head")[0],t=a("style");t.setAttribute("type","text/css");t.setAttribute("media","screen");if(!(h.ie&&h.win)&&typeof K.createTextNode!=b){t.appendChild(K.createTextNode(v+" {"+r+"}"))}u.appendChild(t);if(h.ie&&h.win&&typeof K.styleSheets!=b&&K.styleSheets.length>0){var q=K.styleSheets[K.styleSheets.length-1];if(typeof q.addRule==Q){q.addRule(v,r)}}}function W(t,q){var r=q?"visible":"hidden";if(e&&C(t)){C(t).style.visibility=r}else{V("#"+t,"visibility:"+r)}}function g(s){var r=/[\\\"<>\.;]/;var q=r.exec(s)!=null;return q?encodeURIComponent(s):s}var D=function(){if(h.ie&&h.win){window.attachEvent("onunload",function(){var w=d.length;for(var v=0;v<w;v++){d[v][0].detachEvent(d[v][1],d[v][2])}var t=i.length;for(var u=0;u<t;u++){X(i[u])}for(var r in h){h[r]=null}h=null;for(var q in swfobject){swfobject[q]=null}swfobject=null})}}();return{registerObject:function(u,q,t){if(!h.w3cdom||!u||!q){return }var r={};r.id=u;r.swfVersion=q;r.expressInstall=t?t:false;N[N.length]=r;W(u,false)},getObjectById:function(v){var q=null;if(h.w3cdom){var t=C(v);if(t){var u=t.getElementsByTagName(Q)[0];if(!u||(u&&typeof t.SetVariable!=b)){q=t}else{if(typeof u.SetVariable!=b){q=u}}}}return q},embedSWF:function(x,AE,AB,AD,q,w,r,z,AC){if(!h.w3cdom||!x||!AE||!AB||!AD||!q){return }AB+="";AD+="";if(c(q)){W(AE,false);var AA={};if(AC&&typeof AC===Q){for(var v in AC){if(AC[v]!=Object.prototype[v]){AA[v]=AC[v]}}}AA.data=x;AA.width=AB;AA.height=AD;var y={};if(z&&typeof z===Q){for(var u in z){if(z[u]!=Object.prototype[u]){y[u]=z[u]}}}if(r&&typeof r===Q){for(var t in r){if(r[t]!=Object.prototype[t]){if(typeof y.flashvars!=b){y.flashvars+="&"+t+"="+r[t]}else{y.flashvars=t+"="+r[t]}}}}f(function(){U(AA,y,AE);if(AA.id==AE){W(AE,true)}})}else{if(w&&!A&&c("6.0.65")&&(h.win||h.mac)){A=true;W(AE,false);f(function(){var AF={};AF.id=AF.altContentId=AE;AF.width=AB;AF.height=AD;AF.expressInstall=w;k(AF)})}}},getFlashPlayerVersion:function(){return{major:h.pv[0],minor:h.pv[1],release:h.pv[2]}},hasFlashPlayerVersion:c,createSWF:function(t,r,q){if(h.w3cdom){return U(t,r,q)}else{return undefined}},removeSWF:function(q){if(h.w3cdom){X(q)}},createCSS:function(r,q){if(h.w3cdom){V(r,q)}},addDomLoadEvent:f,addLoadEvent:R,getQueryParamValue:function(v){var u=K.location.search||K.location.hash;if(v==null){return g(u)}if(u){var t=u.substring(1).split("&");for(var r=0;r<t.length;r++){if(t[r].substring(0,t[r].indexOf("="))==v){return g(t[r].substring((t[r].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(A&&M){var q=C(m);if(q){q.parentNode.replaceChild(M,q);if(l){W(l,true);if(h.ie&&h.win){M.style.display="block"}}M=null;l=null;A=false}}}}}();