caparuni 175 Posted May 18, 2010 This module has been reported to the PrestaShop security: it has not been updated for a long time and contains some security issues. For this reason, the zip file has been removed and this disclaimer has been added. The topic will stay available for archival purpose. with this module you can turn your static content (CMS) into news block on left/right nothing fancy in here, im just trying to maximize the used of CMS already provided by presta-team maybe i can say this is the easiest implementation to have news block look-a-like you can go to chenoel.com to see it in action please try it and gimme some report WARNING:this module is a thankyouware so say thank you is a must and send some donation is a hope 44 Share this post Link to post Share on other sites
spoon-407 0 Posted May 19, 2010 Good Job brother!!!To everybody!! Let's go using for this one!!Download -> Try it this beutiful module Share this post Link to post Share on other sites
Jaffa 0 Posted May 19, 2010 is possible to see all news on one page (main)? or how can user see other news if i have about 20-30 news on my web, thanx Share this post Link to post Share on other sites
caparuni 175 Posted May 19, 2010 on progress... will be ready in a few hours Share this post Link to post Share on other sites
caparuni 175 Posted May 19, 2010 done... v0.3 is onlinenow with a view-all-news page (news.php), just put news.php on the root directoryalready comes with blog style pagination, previous/next button on the bottom pagetry it and give some feedback please 1 Share this post Link to post Share on other sites
ysco 77 Posted May 19, 2010 Thanks caparuni, will try your module ysco.. Share this post Link to post Share on other sites
caparuni 175 Posted May 19, 2010 @yscoplease re-download since im kinda mess with the old one, there is a variable ive forgot to delete Share this post Link to post Share on other sites
ysco 77 Posted May 19, 2010 Hello caparuni,Thanks for letting me know, will download again.ysco.. Share this post Link to post Share on other sites
Pshopic 17 Posted May 19, 2010 Thanks for sharing this module. I will write about it in my future posts. Share this post Link to post Share on other sites
caparuni 175 Posted May 19, 2010 Thanks for sharing this module. I will write about it in my future posts. ty PrestaShopic... and btw thank you to include sexy bookmarks on your post Share this post Link to post Share on other sites
21846657 7 Posted May 20, 2010 Thank you caparuni for this contribution. I can see the previous and next buttons at /news.php BTW. Is it possible to add the pagination like 1, 2, 3, ...., the last page etc etc?Cheers, Share this post Link to post Share on other sites
caparuni 175 Posted May 20, 2010 @21846657sure it can be done, but i like to keep it simple just with prev/next button like in blog or wp Share this post Link to post Share on other sites
Jaffa 0 Posted May 21, 2010 i have on page news.php 2 batten on uper side .. (newsletter and other one under this – without text) why? Share this post Link to post Share on other sites
caparuni 175 Posted May 21, 2010 @jaffacould you explain more... since i didnt understand what you mean Share this post Link to post Share on other sites
Creaters 0 Posted May 22, 2010 Thanks buddy... looks good, and works like a charm Share this post Link to post Share on other sites
vezy 0 Posted May 26, 2010 Thank you ever so much! Great module!!! Share this post Link to post Share on other sites
robkwal 7 Posted May 31, 2010 Hi,I would like to use this mod, but would like it within the "Homepage content". I have recently moved from CubeCart to Presta so not as familiar with the code, could you help me... I've tried hooking it into the "Homepage content" I would like it to sit to the right of the special block on the following url www.totalurbanwear.co.uk/store. Share this post Link to post Share on other sites
robkwal 7 Posted May 31, 2010 Sorry to bother you all.... I have solved the problem! T'was staring me right in the face! Share this post Link to post Share on other sites
scanreg 0 Posted May 31, 2010 how did you solve it?thanks Share this post Link to post Share on other sites
robkwal 7 Posted May 31, 2010 Open the file blockcsm.php find the code: public function hookLeftColumn ($params)replace with: public function hookhome($params) Share this post Link to post Share on other sites
lucaazori 0 Posted June 15, 2010 Hi everybody, please how can i configure this module, set new news, delete, etc..because in the back office, it`s not evident..thank you anywhere for the mod..great work Share this post Link to post Share on other sites
caparuni 175 Posted June 15, 2010 just use ps standart CMS to add/edit/delete the news (Back Office >> Tools >> CMS) Share this post Link to post Share on other sites
Joachim Tranberg 1 Posted June 16, 2010 Just tried this module, and it works perfect.But a few things that i need, could you help?Insert the "button-large" as the "View all news". Just like the bestseller and newproducts module.The oppertunity to disable the Module on the front office. So i can just link to news.php in the Header. Share this post Link to post Share on other sites
caparuni 175 Posted June 16, 2010 Just tried this module, and it works perfect.But a few things that i need, could you help?Insert the "button-large" as the "View all news". Just like the bestseller and newproducts module.The oppertunity to disable the Module on the front office. So i can just link to news.php in the Header. go edit blockcms.tpl. add the bottom you will find something like this view all news change that to view all news to disable the module from FO, just go edit position (Back Office >> Modules >> Positions) and delete the module Share this post Link to post Share on other sites
celine37 7 Posted June 17, 2010 Hi,I use this module and it works well !I use "url rewriting" on my shop and I don't know if it could be possible to have url rewrited on the page "news.php" like :http://www.boutique.com/content/1-name-of-my-pageand not : http://www.boutique.com/cms.php?id_cms=1 ( <= that's what I obtain) ?If urls used are not rewrited, could it penalize SEO ? Share this post Link to post Share on other sites
tarkan 0 Posted June 24, 2010 Great module.Question:How can i duplicate this module? Want to hook another one in my right column with different news.Thanks Share this post Link to post Share on other sites
OzWeb 0 Posted July 5, 2010 good day mate! I think the module is great, is it possible to use it in more than one instance? Coz I would like to have one more box using the same system.Could you tell me if this is possible and how to do it?Thank you so much Share this post Link to post Share on other sites
juanma 1 Posted July 5, 2010 This module seems very useful, but I have a serious problem, not me news.php page appears, the cause may be that I use the 1105 version. Please someone help me make it work news.php file.Greetings from Spain. Share this post Link to post Share on other sites
ferdiyan 0 Posted July 22, 2010 Terima kasih pa caparuni, modulnya sangat bermanffat buat saya. Share this post Link to post Share on other sites
jaimeweb 3 Posted August 2, 2010 Hello, is there any hack or modifcation that i can do that will allow me to have a thumbnail image next to each news topic on the "view all" news page? Thank for any help! Share this post Link to post Share on other sites
wqest 0 Posted August 3, 2010 Hello!Noce mod, but if there is some way to syncronize with my Wordpress? Like "read more" leads to WP topic and so... And one more thing. I want this to horizontaly under frontpage editorial picture. Is this possible?Hope u understand me. Share this post Link to post Share on other sites
caparuni 175 Posted August 3, 2010 @wqest:sorry this module just to improved default CMS. if you want to do such thing then u must input the link to your wp manualy on CMSyou can try like on #20 replay on this thread if you want to put this module under frontpage editorial picture Share this post Link to post Share on other sites
ysco 77 Posted August 30, 2010 Thanks mate for this module.Will try this one and see how it works Best regards,ysco.. Share this post Link to post Share on other sites
Camille Frisch 3 Posted September 3, 2010 Great contribution, great module ! thanks !only regret is text format (from tinymce) doesnt seem to make it through the displayed blockBut it is still super useful Share this post Link to post Share on other sites
Bavarian Red 10 Posted September 4, 2010 When i activate this module on my site the w3 validator say this:sorry! this document couldn't be checked or something like this!!! Share this post Link to post Share on other sites
sekol 0 Posted September 8, 2010 Thanks for this module.How to set a friendly url? Where can I set it up - in the file. htaccess? Share this post Link to post Share on other sites
Speedy Gonzales 0 Posted September 26, 2010 Thanks buddy this is exactly what I was looking for. Share this post Link to post Share on other sites
wooly 0 Posted October 6, 2010 A big Thank you, caparuni. Just what I was looking for.Others have asked this question - how easy is it to duplicate the module to have different blocks?For example, "blockarticles"; does this just mean changing the word "news" in each file for the word "article" ?How does this affect the DB ?If someone can point me in the right direction... Share this post Link to post Share on other sites
Sahin Ozyurek 0 Posted October 22, 2010 Thank you brother, for your big and helping heart, Share this post Link to post Share on other sites
espresso 1 Posted November 2, 2010 Makasih bro, ane coba dulu..ya Share this post Link to post Share on other sites
ipz elhakim 2 Posted November 11, 2010 Hi,I use this module and it works well !I use "url rewriting" on my shop and I don't know if it could be possible to have url rewrited on the page "news.php" like :http://www.boutique.com/content/1-name-of-my-pageand not : http://www.boutique.com/cms.php?id_cms=1 ( <= that's what I obtain) ?If urls used are not rewrited, could it penalize SEO ? first of all thanks to caparuni for module,, it's great,, I use it... and very well..and about this problem,, I have modified this module,, just to change the news.tpl and blockcms.tpl ,,here it is..modified.zip 1 Share this post Link to post Share on other sites
zantos 5 Posted November 15, 2010 I have modified this module and have uploaded it in this post. Share this post Link to post Share on other sites
ghostq 3 Posted December 10, 2010 cool module thank you Share this post Link to post Share on other sites
bksmartit 0 Posted December 18, 2010 nice module!I have one problem here...I was able to install this module but I can not edit the news?According what I am reading here I should be able to edit news in Back Office >> Tools >> CMS but the news is not displayed there so I am not able to edit it.What should I do? Any advice? I would appreciate it!Thank you Share this post Link to post Share on other sites
zantos 5 Posted December 20, 2010 PrestaShop Nebie!, have you tried my modified module?When you create a new cms page it will be show in the News module if you haven't put the number in the exceptions and you can modify it with the cms editor tool. Share this post Link to post Share on other sites
bksmartit 0 Posted December 21, 2010 Hey Apprentice,I did installed your updated module and it is working for me....by your explanation I understood how this works.Good job!!! I like this module!!!Thanks you very much Share this post Link to post Share on other sites
zantos 5 Posted December 22, 2010 OK PrestaShop Nebie! but my nick isn't Apprentice, is zantos, HAHAHA. Share this post Link to post Share on other sites
Fant63 3 Posted December 26, 2010 The module does not work with Cyrillic characters ((How do I fix it? Share this post Link to post Share on other sites
Fant63 3 Posted December 26, 2010 DecidedIn blockcms.php replace trim on mb_strimwidthThank you "Sors" Share this post Link to post Share on other sites
navaras 1 Posted January 3, 2011 DecidedIn blockcms.php replace trim on mb_strimwidthThank you "Sors" Hello Fant63,Could you explain what you mean? As i understand you talking about specific php code? Share this post Link to post Share on other sites
Fant63 3 Posted January 7, 2011 Rewrote the module. Now he will work with Cyrillic.Many thanks to the user SORSWhat's next?Next I would like that would be news to appear more interesting - such as manufacturers or suppliers (thanks to user Anton for the idea)But lack the experience ((Who can help? blockcms v0.5.zip Share this post Link to post Share on other sites
Bart95130 0 Posted January 11, 2011 Hitested the 0.5 version, it works (I don't use cyrillic characters)It were nice if you add a readme in the zip with explanation :- How to install the module (extract the zip in the modules directory)- The news.php file must be at the root of the website- How to edit the news with the cms tools of prestashop => in the backoffice tools=>cms...Thx a lotBart Share this post Link to post Share on other sites
Fant63 3 Posted January 11, 2011 The module is open for use and editingAnd you can take part in its elaboration - eg write a manual (read me) Share this post Link to post Share on other sites
Bart95130 0 Posted January 11, 2011 It's a little bit strange to provide a module without instructions, and to ask others to write it...Nervermind here is my contribution :French translationREADME file : Version 0.5 * Support of Cyrillic characters =========================== FRENCH =========================== DESCRIPTION : Module permettant d'afficher un bloc d'actualités basé sur la fonctionnalité CMS de prestashop. INSTALLATION : Comme tous les modules, dezipper le fichier dans le dossier module de prestashop, copier le fichier news.php à la racine de prestashop CONFIGURATION : Dans l'onglet Module du panneau d'administration (back office) cliquer sur Bloc Actualités v0.5 >> Configurer AJOUT D'ACTUALITES : Dans le panneau d'administration se rendre dans outils, CMS. Noter les ID des pages que vous NE VOULEZ PAS afficher comme actualités. Ajouter les actualités en cliquant sur Nouveau. Retourner sur la page de configuration du module et saisissez les ID des pages que vous voulez masquer. =========================== ENGLISH =========================== DESCRIPTION : Modules allowing to display a news block, based on the CMS functionality of prestashop INSTALLATION : Install the plug-in normally : unzip the file in the modules directory of prestashop, move the news.php file at the root of prestashop CONFIGURATION : In the Module Tab of the backoffice click on Block News CMS v0.5 >> Configure ADD NEWS : In the Tools Tab of the back office click on CMS. Memorize the ID of the page you DON'T WON'T to be displayed as news. Add a news by clicking on 'add new'. Go back to the configuration page of the module and enter the IDs of the page you want to hide. Bart fr.php Share this post Link to post Share on other sites
Fant63 3 Posted January 11, 2011 ReadMe a little added [MODULE] Block News CMS =========================== Version 0.5 * Support of Cyrillic characters =========================== Creator caparuni demo: http://www.chenoel.com/ Description of caparuni: with this module you can turn your static content (CMS) into news block on left/right nothing fancy in here, im just trying to maximize the used of CMS already provided by presta-team maybe i can say this is the easiest implementation to have news block look-a-like WARNING: this module is a thankyouware so say thank you is a must and send some donation (http://bit.ly/donate-caparuni) is a hope You can leave a contribution to the development of the module Special thanks for the development of the module (sorry if I missed someone): caparuni, SORS, Fant63, zantos, ipz elhakim, Bart95130 and many others. =========================== ENGLISH =========================== DESCRIPTION : Modules allowing to display a news block, based on the CMS functionality of prestashop INSTALLATION : Install the plug-in normally : unzip the file in the modules directory of prestashop, move the news.php file at the root of prestashop CONFIGURATION : In the Module Tab of the backoffice click on Block News CMS v0.5 >> Configure ADD NEWS : In the Tools Tab of the back office click on CMS. Memorize the ID of the page you DON'T WON'T to be displayed as news. Add a news by clicking on 'add new'. Go back to the configuration page of the module and enter the IDs of the page you want to hide. =========================== FRENCH =========================== DESCRIPTION : Module permettant d'afficher un bloc d'actualites base sur la fonctionnalite CMS de prestashop. INSTALLATION : Comme tous les modules, dezipper le fichier dans le dossier module de prestashop, copier le fichier news.php a la racine de prestashop CONFIGURATION : Dans l'onglet Module du panneau d'administration (back office) cliquer sur Bloc Actualites v0.5 >> Configurer AJOUT D'ACTUALITES : Dans le panneau d'administration se rendre dans outils, CMS. Noter les ID des pages que vous NE VOULEZ PAS afficher comme actualites. Ajouter les actualites en cliquant sur Nouveau. Retourner sur la page de configuration du module et saisissez les ID des pages que vous voulez masquer. blockcms v0.5.zip 1 Share this post Link to post Share on other sites
maycy 0 Posted January 13, 2011 thank you very musch Share this post Link to post Share on other sites
Shila 0 Posted January 19, 2011 This is really GREAT! Thank you so much for this very simple but effective module. Works 100% on my page. Share this post Link to post Share on other sites
trify 0 Posted February 20, 2011 Great module! Thanks a lot!Brief length doesn't seem to work for me. When I look in blockcms.tpl on row 10 it looks like this: {$news.brief|strip_tags:'UTF-8'|truncate:35:'...'} » {l s='read more' mod='blockcms'} It truncates at 35 characters. I can manually change this to 100 or whatever I like but how can I modify this line to pick the value from Back Office "Brief length"?Thanks. //trify Share this post Link to post Share on other sites
Fant63 3 Posted February 20, 2011 Through the Back Office is impossible (Only editing blockcms.tpltruncate: 35 Share this post Link to post Share on other sites
new_sra 1 Posted February 21, 2011 hithank you very muchvery nice module but dos't work in "Friendly URL Enable" mode or SEOfor example in main dir of your site "WWW.YOURSITE.COM" work wellafter view one link for examplewww.yoursite.com/music-ipods/2-ipod-shuffle.htmlthen click one newsyou see error Share this post Link to post Share on other sites
Matje 1 Posted February 23, 2011 great module!Just what I was looking for. Share this post Link to post Share on other sites
new_sra 1 Posted March 1, 2011 very nice module but dos’t work in “Friendly URL Enable” mode or SEOfor example in main dir of your site “WWW.YOURSITE.COM” work wellafter view one link for examplehttp://www.yoursite.com/music-ipods/2-ipod-shuffle.htmlthen click one newsyou see error how can fix this? Share this post Link to post Share on other sites
new_sra 1 Posted March 11, 2011 any one no answer?how can fix this? Share this post Link to post Share on other sites
pasti_riki 0 Posted March 30, 2011 dear, i've found error when installing on PS 1.4. since PS.1.4 also had module blockcms by default.Please advised, when i'm install on it, the blockcms had display "footer", and the footer it self has gone. Share this post Link to post Share on other sites
pluto26 0 Posted March 31, 2011 I am also having issues getting this module working on version 1.4it seems to install ok but the block does not seem to hav ethe same behaviour has seen in some of the earlier posts.does it support version 1.4? Share this post Link to post Share on other sites
NicotineLL 0 Posted April 7, 2011 Great module, thanks!By the way, if you have problems with unexpected characters (cut characters) at the end of the brief, you can fix this by replacing this code: 'brief' => trim(substr(strip_tags($cms['content']), 0, intval($config['PS_CMS_LENGTH']))), with this one 'brief' => trim(mb_substr(strip_tags($cms['content']), 0, intval($config['PS_CMS_LENGTH']), 'UTF-8')), in both blockcms.php and news.php Share this post Link to post Share on other sites
robkwal 7 Posted April 14, 2011 I too am unable to get this to function correctly on the latest version! Is there any plans to make this V1.4.0.17 compatible?! Share this post Link to post Share on other sites
hiedler 0 Posted April 28, 2011 thanks,works really nice for me...cheers Share this post Link to post Share on other sites
pluto26 0 Posted April 28, 2011 What version did you implement this on? Share this post Link to post Share on other sites
viar 3 Posted June 13, 2011 can we use this on 1.4.1? Share this post Link to post Share on other sites
Jevgen 12 Posted June 15, 2011 works great on 1.3.6.0 Share this post Link to post Share on other sites
yxhdswl 0 Posted July 7, 2011 Thank you,but I tried,there is a bug,when I clicked on categry and clicked one product,saddly,I move mouse to nes.php,the path has changeed,change to ex. http://www.sitename.com/categery_name/news.php,not http://www.sitename.com/news.php,someone who can help me to solve this problem,thank you first,my email is : yxh1619@gmail.com Share this post Link to post Share on other sites
swally 0 Posted July 14, 2011 Thanks - I'm trying it out now ... but I have a question:It displays the existing CMS documents as news articles, but as I create additional CMS documents, it displays the new ones and drops the 'about us', 'our guarantee', and 'terms and conditions of use' ....Is this right, or should I somehow be creating the CMS news articles somewhere else?Thanks much! Share this post Link to post Share on other sites
swally 0 Posted July 15, 2011 Got it ... It's displaying the news articles fine, but does anyone know where the colors for the links in the CMS news articles is controlled? Mine has reverted to the dreaded blue/purple, and it doesn't look too great with my page.Thanks again! Share this post Link to post Share on other sites
swally 0 Posted July 16, 2011 I think things are looking pretty good with the news block ... but does anyone else have two "Home" links at the bottom of the News page?Being a novice, I didn't know if the code at the end of the new.tpl page was meant to all go after the 'if' statement or if there should be an else included between the two tags possibly? It looks to me like there are going to be two links, one with an image and one with text. (I've attached that part of the code.)Thanks Share this post Link to post Share on other sites
vasekcekal 5 Posted August 21, 2011 what about v1.4.4? Share this post Link to post Share on other sites
swally 0 Posted September 5, 2011 I had liked using this module with v1.3.4, but now that I've upgraded to 1.4.4.0, it no longer works. I haven't found if there is a version compatible with the updated versions of PS. Any info about updates that are out there or are on the way? Thanks Share this post Link to post Share on other sites
hali_on 3 Posted September 26, 2011 Hi. Thanks ! Fixed the problem with the url in 1.4.4.1 adding {$base_dir} in blockcms.tpl. Also trying to keep the blockcms working. Some problems remains , preview and ignore categories are not working yet. http://www.megaupload.com/?d=2F00DW4O Thanks again. Apologies for my english. Share this post Link to post Share on other sites
Guest Posted January 6, 2012 I am in the need of a "NEWS" page on the top of my shop like: HOME, NEWS, SPECIALS, SITEMAP, CONTACT. However, I'll try this when finding a way to create the NEWS page. Thank you. 1 Share this post Link to post Share on other sites
oduc78 0 Posted February 5, 2012 Great module, just what I was looking for! Thanks. Share this post Link to post Share on other sites
libnac 1 Posted February 9, 2012 Is there a way to install this module like a new module leaving blockcms how it is? I need to mantain the cms structure for a website and add a news module.. Thanks in advance! and great job! Share this post Link to post Share on other sites
azka2012 0 Posted February 18, 2012 Modul yang saya cari-cari. Terima kasih banyak Share this post Link to post Share on other sites
Cvalya 6 Posted February 20, 2012 Hello! After install i have white screen on homepage. How do you think, where problem? prestashop ver: 1.4.6.2 Installation process: copy with replace files on "blockcms" folder in modules folder. Cope news.php in root. BO works FO get whitescreen If disable module then FO works. Share this post Link to post Share on other sites
Cvalya 6 Posted February 21, 2012 After turn on "debug mode" i catch this: Fatal error: Uncaught exception 'SmartyCompilerException' with message 'Syntax Error in template "/path/to/site/modules/blockcms/blockcms.tpl" on line 6 "{foreach from=$news item=news}" item variable 'news' may not be the same variable as at 'from'' in /path/to/site/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php:431 Stack trace: #0 /path/to/site/tools/smarty/sysplugins/smarty_internal_compile_foreach.php(40): Smarty_Internal_TemplateCompilerBase->trigger_template_error('item variable '...', 6) #1 /path/to/site/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php(284): Smarty_Internal_Compile_Foreach->compile(Array, Object(Smarty_Internal_SmartyTemplateCompiler), Array, NULL, NULL) #2 /path/to/site/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php(123): Smarty_Internal_TemplateCompilerBase->callTagCompiler('foreach', Array, Array) #3 /home/ in /path/to/site/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php on line 431 Share this post Link to post Share on other sites
Cvalya 6 Posted February 23, 2012 To solve Fatal error: - In BO check use Smarty 2 If after you get "Assign a valid CMS page if you want it to be read" to solve this turn off "term of use". Share this post Link to post Share on other sites
phuongvyhanghieu 3 Posted February 27, 2012 My PrestaShop™ 1.4.6.2. I installed and activated the module, my front page turn white blank. Then I uninstalled the module, my original BlockCMS was gone on BO. Please help me to restore the original blockCMS. Thanks Share this post Link to post Share on other sites
phuongvyhanghieu 3 Posted February 27, 2012 with this module you can turn your static content (CMS) into news block on left/right nothing fancy in here, im just trying to maximize the used of CMS already provided by presta-team maybe i can say this is the easiest implementation to have news block look-a-like you can go to chenoel.com to see it in action please try it and gimme some report WARNING: this module is a thankyouware so say thank you is a must and send some donation is a hope I use PrestaShop™ 1.4.6.2 . This module is not working on my website. I installed and activate the module, the front page turn white blank. Then I uninstalled your module, my original blockCMS was gone on BO. However, I still see blockCMS on cPanel. Please anyone can help me to restore orginal blockCMS back to BO. Thank you very much in advance Share this post Link to post Share on other sites
Cvalya 6 Posted February 27, 2012 I write solution in post #88. To check your problem need more info. Turn on "debug mode" in config files (Show PHP errors). Share this post Link to post Share on other sites
phuongvyhanghieu 3 Posted February 27, 2012 I write solution in I write solution in post #88. To check your problem need more info. Turn on "debug mode" in config files (Show PHP errors). To check your problem need more info. Turn on "debug mode" in config files (Show PHP errors). Thank you for your response. I am a newbie, I tried to turn debug on /* Debug only */ @ini_set('display_errors', 'on'); define('_PS_DEBUG_SQL_', true); , but no error info apear. My site is still working, except the blockCMS of header and footer are not working. I really appreciate for your help 1 Share this post Link to post Share on other sites
sahar 0 Posted March 4, 2012 awesome module! Thank you bro. I would like to translate this module. Could you give me a hint which file contains the language parameters and how can i turn it to a rtl-language? Share this post Link to post Share on other sites
haylam.vn 30 Posted March 24, 2012 Thanks for sharing. Is this module compatitive with PS 1.4. And the domain of demo site expired on Mar 23 2012. Then you should renew it 1 Share this post Link to post Share on other sites
tdr170 679 Posted March 25, 2012 Tried this today in 1.4.7 and got message below, uninstalled and realized my original CMS block was gone from front office features lucky for me I keep a backup. If I need to change other parts of Presta (smarty) to use then for me there is a compatibility issue and will not use. Good Idea though I would rather add this as an addition to the static CMS block on left and have this on right. Fatal error: Uncaught exception 'SmartyCompilerException' with message 'Syntax Error in template "/hermes/bosweb/web066/b667/ipg.mysite/shop/modules/blockcms/blockcms.tpl" on line 6 "{foreach from=$news item=news}" item variable 'news' may not be the same variable as at 'from'' in /hermes/bosweb/web066/b667/ipg.mysite/shop/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php:431 Stack trace: #0 /hermes/bosweb/web066/b667/ipg.mysite/shop/tools/smarty/sysplugins/smarty_internal_compile_foreach.php(40): Smarty_Internal_TemplateCompilerBase->trigger_template_error('item variable '...', 6) #1 /hermes/bosweb/web066/b667/ipg.mysite/shop/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php(284): Smarty_Internal_Compile_Foreach->compile(Array, Object(Smarty_Internal_SmartyTemplateCompiler), Array, NULL, NULL) #2 /hermes/bosweb/web066/b667/ipg.mysite/shop/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php(123): Smarty_Intern in/hermes/bosweb/web066/b667/ipg.mysite/shop/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php on line 431 Share this post Link to post Share on other sites
exacore 0 Posted April 1, 2012 Hi Caparuni, thank you for sharing this module, also for other partisipant in this forum. I've downloaded this module and when i installed, i've got some problem. When i click view all news, page showed error 404. What should i do? you can see the web www.exacorecomputer.com Thank you for helping me. Share this post Link to post Share on other sites
contactovisual 3 Posted May 3, 2012 Hi all I managed to adapt this module to Prestashop version 1.4.7.3 If anyone wants to know how, here are the main guidelines (this is based on the blockcms module v 0.5, found previously on this topic): 1. Before installing or even copy the module to your shop, change the name of the module folder and files, because prestashop now have a module with the same name. We don't want to override prestashop's module. I changed it to "blockcmsnews": - change the module folder name to "blockcmsnews" - open the folder and change the file name "blockcms.php" to "blockcmsnews.php" - change to file name "blockcms.tpl" to "blockcmsnews.tpl" 2. Now open the file "blockcmsnews.php" - On line 3, change class blockcms extends Module to class blockcmsnews extends Module - On line 12, change $this->name = 'blockcms'; to $this->name = 'blockcmsnews'; - [optional] On line 14, change $this->tab = '[mod-id]'; to $this->tab = 'front_office_features'; - On line 168, change return $this->display(__FILE__, 'blockcms.tpl'); to return $this->display(__FILE__, 'blockcmsnews.tpl'); Save the file. 3. Now open file "blockcmsnews.tpl" - On line 10, find mod='blockcms' change to mod='blockcmsnews' Save the file 4. Open file "news.php" (is outside the module folder) - On line 49, change $smarty->display(_PS_MODULE_DIR_.'blockcms/news.tpl'); to $smarty->display(_PS_MODULE_DIR_.'blockcmsnews/news.tpl'); Save the file 5. Open file "news.tpl" (is inside the module folder) - On line 7, find and change mod='blockcms' to mod='blockcmsnews' - On line 23, find and change mod='blockcms' to mod='blockcmsnews' Save file This should be enough, but after installing I found additional problems, so, before installing, here are the changes I made to get it running: 6. Open again file "blockcmsnews.tpl" - On line 6, change item=news to item=cmsnews (for some reason, the smarty compiler returns an error because the from variable and item variable have the same name, so I changed it) - On line 8, find and replace every instance of the variable $news to $cmsnews for example, on cms.php?id_cms={$news.id} change to cms.php?id_cms={$cmsnews.id} - On line 10, do the same replacement. Save the file 7. Open again file "news.tpl" We have to do the same here. - On line 4, change {foreach from=$news item=news} to {foreach from=$news item=cmsnews} - On line 6 and 7, find and replace every instance of the variable $news to $cmsnews - On line 20, change {foreach from=$news item=news} to {foreach from=$news item=cmsnews} - On line 22 and 23, find and replace every instance of the variable $news to $cmsnews Save the file Now you're ready to install the module. - Copy the now renamed "blockcmsnews" module folder to the "modules" folder of your shop - Copy the file "news.php" to the root folder of your shop - Upload to the server - Open the Modules tab - Expand the Front Office Features section - Find the line with the module Block News CMS v0.5 and click Install Should be up and running Now, I made an additional change (this is for Caparuni to develop it better, if he wants to). The concept of the module, is to add the IDs of CMS pages we do not want to use. But Prestashop has CMS organized in categories now. So I thought, why not add a CMS subcategory for News, and have this module just find the category ID and all the CMS pages added under that subcategory? Here's what I did: 1. On file "blockcmsnews.php" I will change PS_CMS_IGNORE to PS_CMS_CATEGORY. The idea is, instead of naming the IDs of pages I do not want to show, I want to identify the category (or categories, if you more) I want to display - On line 29, change OR !Configuration::updateValue('PS_CMS_IGNORE', NULL) to OR !Configuration::updateValue('PS_CMS_CATEGORY', NULL - On line 42, change OR !Configuration::updateValue('PS_CMS_IGNORE', NULL) to OR !Configuration::updateValue('PS_CMS_CATEGORY', NULL) - On line 70, change Configuration::updateValue('PS_CMS_IGNORE', $_POST['cmsignore']); to Configuration::updateValue('PS_CMS_CATEGORY', $_POST['cmscategory']); - On line 101, change <label>'.$this->l('Ignored').'</label> to <label>'.$this->l('Category').'</label> - On line 102, change <div class="margin-form"><input type="text" name="cmsignore" id="cmsignore" value="'.Configuration::get('PS_CMS_IGNORE').'" size="50"> to <div class="margin-form"><input type="text" name="cmscategory" id="cmscategory" value="'.Configuration::get('PS_CMS_CATEGORY').'" size="50"> - On line 103, change <p class="clear">'.$this->l('ignore list will not shown on the news block/page.<br>insert cms-id and use , (comma) for multiple cms. ex: 1,2,3,4').'</p> to <p class="clear">'.$this->l('enter category ID to search that category,<br>you can use multiple categories, (comma separated). ex: 1,2,3,4').'</p> - On line 147, change $config = Configuration::getMultiple(array('PS_CMS_TITLE', 'PS_CMS_LIMIT', 'PS_CMS_BRIEF', 'PS_CMS_LENGTH', 'PS_CMS_IGNORE')); to $config = Configuration::getMultiple(array('PS_CMS_TITLE', 'PS_CMS_LIMIT', 'PS_CMS_BRIEF', 'PS_CMS_LENGTH', 'PS_CMS_CATEGORY')); - On line 153, change '.(!empty($config['PS_CMS_IGNORE']) ? 'WHERE c.id_cms NOT IN ('.$config['PS_CMS_IGNORE'].')' : '').' to '.(!empty($config['PS_CMS_CATEGORY']) ? 'WHERE c.id_cms_category IN ('.$config['PS_CMS_CATEGORY'].')' : '').' Save the file. Upload to server. 2. On file "news.php" - On line 11, change $config = Configuration::getMultiple(array('PS_CMS_TITLE', 'PS_CMS_LIMIT', 'PS_CMS_BRIEF', 'PS_CMS_LENGTH', 'PS_CMS_IGNORE', 'PS_CMS_PAGE')); to $config = Configuration::getMultiple(array('PS_CMS_TITLE', 'PS_CMS_LIMIT', 'PS_CMS_BRIEF', 'PS_CMS_LENGTH', 'PS_CMS_CATEGORY', 'PS_CMS_PAGE')); - On line 13, change $all_rows = Db::getInstance()->getValue('SELECT count(*) FROM '._DB_PREFIX_.'cms c '.(!empty($config['PS_CMS_IGNORE']) ? 'WHERE c.id_cms NOT IN ('.$config['PS_CMS_IGNORE'].')' : '') ); to $all_rows = Db::getInstance()->getValue('SELECT count(*) FROM '._DB_PREFIX_.'cms c '.(!empty($config['PS_CMS_CATEGORY']) ? 'WHERE c.id_cms_category IN ('.$config['PS_CMS_CATEGORY'].')' : '') ); - On line 23, change '.(!empty($config['PS_CMS_IGNORE']) ? 'WHERE c.id_cms NOT IN ('.$config['PS_CMS_IGNORE'].')' : '').' to '.(!empty($config['PS_CMS_CATEGORY']) ? 'WHERE c.id_cms_category IN ('.$config['PS_CMS_CATEGORY'].')' : '').' Save the file. Upload it to the server. 3. Now, on the Shop Administration, go to Tools tab and select CMS - Add a new subcategory, and name it News - Add some CMS pages with news - Memorize or copy the subcategory ID (is on the left column on the CMS list) and go to Modules - Find the line with the module Block News CMS v0.5 and click Configure - On the Category field, enter the News subcategory ID - Save That's it. You now have a consistent News Module loading CMS pages from a News category. There is a lot more we could do on the module, like date, author, or more. But it is good for now. Nelson G. / Contacto Visual 2 Share this post Link to post Share on other sites
alex2c 0 Posted May 30, 2012 (edited) Hi Contactovisual, I just did "from A to Z" as you did write on #97. I use PS 1.4.7. It works 4 me ! Thx I found one fault with links: when I am on main site, links in news are OK, like: /cms.php?id_cms=4 but when I enter to one of the news page (or other CMS page), links are like /content/cms.php?id_cms=4 and click on them shows error. greetings! Edited May 30, 2012 by alex2c (see edit history) Share this post Link to post Share on other sites