Jump to content

[MODULE] Block News CMS


caparuni
 Share

Recommended Posts

done... v0.3 is online
now with a view-all-news page (news.php), just put news.php on the root directory
already comes with blog style pagination, previous/next button on the bottom page

try it and give some feedback please

  • Like 1

Share this post


Link to post
Share on other sites

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

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

  • 2 weeks later...

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

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

  • 2 weeks later...

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

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

  • 3 weeks later...
  • 2 weeks later...

Hello!

Noce mod, but if there is some way to syncronize with my Wordpress? Like "read more" leads to WP topic and so... :P
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

@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 CMS

you 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

  • 4 weeks later...
  • 3 weeks later...
  • 2 weeks later...

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

  • 3 weeks later...
  • 2 weeks later...
  • 2 weeks later...
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-page
and 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

  • Like 1

Share this post


Link to post
Share on other sites

  • 4 weeks later...

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

  • 2 weeks later...

Rewrote the module. Now he will work with Cyrillic.
Many thanks to the user SORS

What'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

36439_Wn6OtiylsDhr0Vv8VuYD_t

Share this post


Link to post
Share on other sites

Hi
tested 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 lot

Bart

Share this post


Link to post
Share on other sites

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 translation

README 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

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

  • Like 1

Share this post


Link to post
Share on other sites

  • 1 month later...

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

  • 1 month later...

I am also having issues getting this module working on version 1.4

it 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

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

  • 2 weeks later...
  • 1 month later...
  • 3 weeks later...

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

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

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

  • 1 month later...
  • 2 weeks later...

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

  • 3 weeks later...
  • 3 months later...

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.

  • Like 1

Share this post


Link to post
Share on other sites

  • 5 weeks later...

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

  • 2 weeks later...

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

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

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

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

  • Like 1

Share this post


Link to post
Share on other sites