Jump to content

[Module] Free Blog Module - A usefull PrestaShop Module


Recommended Posts

  • Replies 770
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

Hi, We have released FREE BLOG MODULE, that allow shop owner to manage categories, posts (articles), comments, tags. Also the module allows customer to leave comments on posts. The module is really u

My modified version on this post, please follow the same instructions from the post #505:   plblog.zip

I got the backoffice working! Some changes are necessary in the CategoryObject.php file and the other *Object.php files due to a change in Prestashop 1.5.3.   But for some reason I cannot get the fr

Posted Images

instalar el modulo normalmente, activar url amigables, luego borrar los ultimos 4 registros de blog que creo en seo y urls, luego desactivar "Automáticamente redirigifdos a la URL canónica". por ultimo en la primera linea de el .htaccces pegar el siguiente codigo remplazando lo localhost: por tu dominio, y /sitios/DESARROLLO/SITIOWEB/: por tu directorio en caso de estar en la raiz dejar solo con un /.

 

RewriteEngine on
RewriteCond %{HTTP_HOST} ^localhost$
RewriteRule . - [E=REWRITEBASE:/sitios/DESARROLLO/SITIOWEB/]
RewriteRule ^api/?(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]
RewriteRule ^(../)blog/all-post.html$ %{ENV:REWRITEBASE}modules/plblog/frontent/all-post.php [QSA,L]
RewriteRule ^(../)blog/([a-zA-Z0-9-]*)/([0-9]*)-([a-zA-Z0-9-]*).html$ %{ENV:REWRITEBASE}modules/plblog/frontent/details.php?plcn=$1&plidp=$2&plpn=$3&.php [QSA,L]
RewriteRule ^(../)blog/([0-9]*)_([a-zA-Z0-9-]*).html$ %{ENV:REWRITEBASE}modules/plblog/frontent/list-post.php?plidc=$1&plcn=$2&.php [QSA,L]
RewriteRule ^(../)blog/tag/([a-zA-Z0-9-]*)_([0-9]*).html$ %{ENV:REWRITEBASE}modules/plblog/frontent/list-tags.php?pltn=$1&plidt=$2&.php [QSA,L]

 

aclaro el modulo que instale fue: http://www.prestashop.com/forums/index.php?app=core&module=attach&section=attach&attach_id=62187

Edited by wfpaisa (see edit history)

Share this post


Link to post
Share on other sites

Hi,

 

I tried to modify the AdminplPost.php file to add the tinyMce Editor to the content Textarea.

I want to add the "autoload_rte=true" parameter into the line.75 but impossible to do.

 

$this->displayRowMultiLang($this->l('Content'), 'post_description', 'textarea', $obj, null, 90, 10, true);

 

I've done :

 

$this->displayRowMultiLang($title = $this->l('Content'), $name = 'post_description', $type = 'textarea', $obj, $note = null, $cols = 90, $rows = 10, $autoload_rte=true);

 

You can see Im' not an expert with this process (different from prestashop 1.4), but it can be very usefull for everyone !

If someone haven an idea....

Edited by b2comm (see edit history)

Share this post


Link to post
Share on other sites

To add tiny_mce I did a dirty fix.

 

on AdminPlPost.php line line 30: function displayForm($isMainTab = true), at the bottom of it just right before the </form> tag add this lines (tiny_mce init)

 

<script type="text/javascript">
 tinyMCE.init({
 // General options
		    mode : "specific_textareas",
		    editor_selector : "rte",
 theme : "advanced",
 plugins : "autolink,lists,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,advlist,autosave",
 // Theme options
 theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
 theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
 theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
 theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak,restoredraft",
 theme_advanced_toolbar_location : "top",
 theme_advanced_toolbar_align : "left",
 theme_advanced_statusbar_location : "bottom",
		    theme_advanced_path : false,
 theme_advanced_resizing : true,
		    relative_urls : false,
		    urlconvertor_callback: "convLinkVC",
		    //file_browser_callback : "filebrowser",
		    width: "600px",
 height: "auto",
 // Example content CSS (should be your site CSS)
 //content_css : "css/content.css",
 // Drop lists for link/image/media/template dialogs
 template_external_list_url : "lists/template_list.js",
 external_link_list_url : "lists/link_list.js",
 external_image_list_url : "lists/image_list.js",
 media_external_list_url : "lists/media_list.js",
 // Style formats
 style_formats : [
  {title : \'Bold text\', inline : \'b\'},
  {title : \'Red text\', inline : \'span\', styles : {color : \'#ff0000\'[spam-filter],
  {title : \'Red header\', block : \'h1\', styles : {color : \'#ff0000\'[spam-filter],
  {title : \'Example 1\', inline : \'span\', classes : \'example1\'},
  {title : \'Example 2\', inline : \'span\', classes : \'example2\'},
  {title : \'Table styles\'},
  {title : \'Table row 1\', selector : \'tr\', classes : \'tablerow1\'}
 ],
 // Replace values for the template plugin
 template_replace_values : {
  username : "Some User",
  staffid : "991234"
 }
});
function convLinkVC(strUrl, node, on_save) {
	    strUrl=strUrl.replace("../","");
	    return strUrl;
   }
 </script>

  • Like 1

Share this post


Link to post
Share on other sites

I tried your module worked great. the one thing I wish it had as an option though is to add a thumbnail to the post section before a user goes in to read the full post.

  • Like 1

Share this post


Link to post
Share on other sites

Hello everybody i have couple of problems with this module.

 

1) Manage Category - i made some categories but i cant select it from the list in Manage Post creation

 

2) I made some test posts, then delete categories, and the posts was deleted from admin list too, but stay on the web, now i dont know what to do with it

Share this post


Link to post
Share on other sites

Hello everybody,

 

I just set up the module but I met some trouble all links brings to a 404 error.

 

Moreover I'm on Ps 1.5 so I can not regenerate the .htaccess.

 

Anykind of help will be much appreciated.

 

regards

Share this post


Link to post
Share on other sites

Hi there. I just downloaded the module and it works as said. However, I need a blog where I am able to post pictures and downloadable PDFs. Is there any solution to this blog module? Or are there any other possible blog module to consider?

Share this post


Link to post
Share on other sites

it is as if working in presta 1.5.1 on the front end, but when i try to access the Blog part from the admin, it gives me an error

 

Fatal error: Cannot redeclare class AdminTabCore in /xxxx/classes/AdminTab.php on line 32

 

anyone knows what can be the problem?

Share this post


Link to post
Share on other sites

Hi,

We have released FREE BLOG MODULE, that allow shop owner to manage categories, posts (articles), comments, tags. Also the module allows customer to leave comments on posts. The module is really usefull for most of ecommerce site.

 

Module Features:

 

* Allow admin to create, edit, remove categories with multi levels

* Allow admin to create, edit, remove Posts

* Allow admin to manage comment ( Approve, Remove)

* Allow admin to manage Tags

* Admin can enable or disable comment ability for each Post

* Support URL-Friendly

* Support Meta Title, Meta Description, Meta Keywords for categories, Post

* Allow show categories, Tags on the left or right

* Allow show the latest Posts on the left or right

* Support Multi languages

* Support Captcha to protect the site from spam

* Support Pagination on list post if number of posts more than 10 items

 

Module Version: 1.1.6

Compatibility: PrestaShop 1.4.x

 

ChangeLog

Legend:

+ new feature added

* bug fix

 

1.1.8

* Fix some words typo

1.1.7

* Fix translateable issue

1.1.6

* Fix warning message when using Debug mode

1.1.5

* Fix back office tab on multi languages

* Put Blog tab below Tools tab

1.1.4

Module released

 

 

You can see the blog module live demo here

 

You can visit our website for more prestashop modules

 

 

 

 

blog1.PNG

 

 

blog2.PNG

 

 

 

 

blog4.PNG

 

When will this be available again please??

Share this post


Link to post
Share on other sites

Hi.

What needs to be changed in the file to display the most recent entry at the top and the oldest at the bottom of the list. My version of prestashop 1.4.4.1 and plblog 1.8

 

And63

Share this post


Link to post
Share on other sites

I installed tis module on ps 1.5.3 and it looks ok but it doesn't work :) No error dispalyed, but when I try to create a category it gives a blank page and the categ isnt created... any solutions? I really love this module and it seems that google loves it too :)

Share this post


Link to post
Share on other sites

Hi people

1.5.3.1

 

1) Download the version made by Chirby - http://www.prestashop.com/forums/topic/212061-modulo-blog-noticias-prestashop-152/

2) Look in PostObject.php line 49 for "parent::validateFields;" and change it to "parent::validateFields(false);"

3) Desactivate Canonical redirection in BO SEO&URL

4) Delete the 4 URL in BO SEO&URL

5) Add to .htaccess just before the # Dispatcher following:

# Blog

RewriteRule ^(../)blog/all-post.html$ %{ENV:REWRITEBASE}modules/plblog/frontent/all-post.php [QSA,L]

RewriteRule ^(../)blog/([a-zA-Z0-9-]*)/([0-9]*)-([a-zA-Z0-9-]*).html$ %{ENV:REWRITEBASE}modules/plblog/frontent/details.php?plcn=$2&plidp=$3&plpn=$4&.php [QSA,L]

RewriteRule ^(../)blog/([0-9]*)_([a-zA-Z0-9-]*).html$ %{ENV:REWRITEBASE}modules/plblog/frontent/list-post.php?plidc=$1&plcn=$2&.php [QSA,L]

RewriteRule ^(../)blog/tag/([a-zA-Z0-9-]*)_([0-9]*).html$ %{ENV:REWRITEBASE}modules/plblog/frontent/list-tags.php?pltn=$1&plidt=$2&.php [QSA,L]

 

voila!

 

Thanks goes to Chirby and Nerque

 

I dont use categories neither tags but the "parent::validateFields;" appears as well in TagsObject.php

 

The only problem i have is the link <a href="{$home}blog/all-post.html"> placed in menu of the page and when im in blog pages and click the link for some strange reason it duplicate the direction:

 

normal

/modules/ps/en/blog/all-post.html

but when i want to use the same link from the blog page it duplicate the "blog"

/modules/ps/en/blog/blog/all-post.html

 

Dunno how to solve this but the blog works very well :)

 

Oh and watch out for style.css which replace some styles from global.css

 

Have fun

Share this post


Link to post
Share on other sites

Hi people

1.5.3.1

 

1) Download the version made by Chirby - http://www.prestasho...prestashop-152/

2) Look in PostObject.php line 49 for "parent::validateFields;" and change it to "parent::validateFields(false);"

3) Desactivate Canonical redirection in BO SEO&URL

4) Delete the 4 URL in BO SEO&URL

..................

 

Have fun

 

Hello,

 

Thanks, friendly URL become working, but 404 error still appears.

Share this post


Link to post
Share on other sites

Hi people

1.5.3.1

 

1) Download the version made by Chirby - http://www.prestasho...prestashop-152/

2) Look in PostObject.php line 49 for "parent::validateFields;" and change it to "parent::validateFields(false);"

3) Desactivate Canonical redirection in BO SEO&URL

4) Delete the 4 URL in BO SEO&URL..

 

Why is good idea deactivate Canonical URL?

 

SEF (disable canonical is not good for that) is always more important than any other feature, like blog module (Use WP, or use ps14+plblog instead ps1.5)

 

I use plblog 1.8 into ps14.6.2 with no poblem. Unique was about collation into plblog tables, usin swedish instead utf8-general.

Many thanks to developer/s.

Share this post


Link to post
Share on other sites
  • 2 weeks later...

I got the backoffice working! Some changes are necessary in the CategoryObject.php file and the other *Object.php files due to a change in Prestashop 1.5.3.

 

But for some reason I cannot get the frontend to work properly. And I want it WITH friendly URL. Without friendly URL is no option.

 

Just install the plblog152v2 version as found below.

 

But please let someone fix the frontend side including friendly URL. Thanks

plblog152v2.zip

  • Like 4

Share this post


Link to post
Share on other sites

I got a problem my post are not showing in the frontend.. It was working fine from months but today i checked the older and new post and none of them were showing. In the back end everything is fine posts are enable under blog module and the content are there..

Help me on this. chekc it out here

http://www.kathmanduclothing.com/en/blog/all-post.html

Share this post


Link to post
Share on other sites

Hi,

We have released FREE BLOG MODULE, that allow shop owner to manage categories, posts (articles), comments, tags. Also the module allows customer to leave comments on posts. The module is really usefull for most of ecommerce site.

 

Module Features:

 

* Allow admin to create, edit, remove categories with multi levels

* Allow admin to create, edit, remove Posts

* Allow admin to manage comment ( Approve, Remove)

* Allow admin to manage Tags

* Admin can enable or disable comment ability for each Post

* Support URL-Friendly

* Support Meta Title, Meta Description, Meta Keywords for categories, Post

* Allow show categories, Tags on the left or right

* Allow show the latest Posts on the left or right

* Support Multi languages

* Support Captcha to protect the site from spam

* Support Pagination on list post if number of posts more than 10 items

 

Module Version: 1.1.6

Compatibility: PrestaShop 1.4.x

 

ChangeLog

Legend:

+ new feature added

* bug fix

 

1.1.8

* Fix some words typo

1.1.7

* Fix translateable issue

1.1.6

* Fix warning message when using Debug mode

1.1.5

* Fix back office tab on multi languages

* Put Blog tab below Tools tab

1.1.4

Module released

 

 

You can see the blog module live demo here

 

You can visit our website for more prestashop modules

 

 

 

 

blog1.PNG

 

 

blog2.PNG

 

 

 

 

blog4.PNG

quiero descargarlo y no puedo como puedo hacer me dice q no tengo autorizacion pero yo si estoy logeado me pueden ayudar

Share this post


Link to post
Share on other sites

I got the backoffice working! Some changes are necessary in the CategoryObject.php file and the other *Object.php files due to a change in Prestashop 1.5.3.

 

But for some reason I cannot get the frontend to work properly. And I want it WITH friendly URL. Without friendly URL is no option.

 

Just install the plblog152v2 version as found below.

 

But please let someone fix the frontend side including friendly URL. Thanks

 

Great work, got the frontend to work yet?

  • Like 1

Share this post


Link to post
Share on other sites

Great module, but I'm having problems with the links.

 

Whenever I want to add a category or a post, I keep getting a page not found-error. Somehow the links aren't formatted correctly.

Instead of going to

/admin/index.php?controller=AdminPlBlog&addpl_blog_post&token=[token]

 

the links and forms refer to "just"

/admin/&addpl_blog_post&token=[token]

 

Does anybody have more luck at this?

I'm using PS 1.5.3.1 and I downloaded the module from Art A's reply btw.

Share this post


Link to post
Share on other sites

i added the code of add this in the blog details .tpl file and i got error.

Does anybody has added social sharing button on their blog module < this module>?

Share this post


Link to post
Share on other sites

wax100, Amour

In path_to_www/modules/plblog/PostObject.php on line 32 (depending on file version) change element type of $definiton array to self::TYPE_HTML:

'post_description' =>   array('type' => self::TYPE_HTML, 'lang' => true, 'validate' => 'isCleanHtml', 'required' => true),

 

Also who have problems with permalinks, you must do follow steps:

1. In .htaccess, change

#BLOG
RewriteRule ^(../)blog/all-post.html$ %{ENV:REWRITEBASE}modules/plblog/frontent/all-post.php [QSA,L]
RewriteRule ^(../)blog/([a-zA-Z0-9-]*)/([0-9]*)-([a-zA-Z0-9-]*).html$ %{ENV:REWRITEBASE}modules/plblog/frontent/details.php?plcn=$1&plidp=$2&plpn=$3&.php [QSA,L]
RewriteRule ^(../)blog/([0-9]*)_([a-zA-Z0-9-]*).html$ %{ENV:REWRITEBASE}modules/plblog/frontent/list-post.php?plidc=$1&plcn=$2&.php [QSA,L]
RewriteRule ^(../)blog/tag/([a-zA-Z0-9-]*)_([0-9]*).html$ %{ENV:REWRITEBASE}modules/plblog/frontent/list-tags.php?pltn=$1&plidt=$2&.php [QSA,L]

 

On

 

#BLOG
RewriteRule ^../blog/all-post.html$ %{ENV:REWRITEBASE}modules/plblog/frontent/all-post.php [QSA,L]
RewriteRule ^../blog/([a-zA-Z0-9-]*)/([0-9]*)-([a-zA-Z0-9-]*).html$ %{ENV:REWRITEBASE}modules/plblog/frontent/details.php?plcn=$1&plidp=$2&plpn=$3&.php [QSA,L]
RewriteRule ^../blog/([0-9]*)_([a-zA-Z0-9-]*).html$ %{ENV:REWRITEBASE}modules/plblog/frontent/list-post.php?plidc=$1&plcn=$2&.php [QSA,L]
RewriteRule ^(../)blog/tag/([a-zA-Z0-9-]*)_([0-9]*).html$ %{ENV:REWRITEBASE}modules/plblog/frontent/list-tags.php?pltn=$1&plidt=$2&.php [QSA,L]

 

2. In path_to_www/modules/plblog/frontent/controllers/DetailsController.php comment out the line 11 (depending on file version) in object Constructor:

//$this->php_self = "blog/".Tools::getValue('plcn').'/'.Tools::getValue('plidp').'-'.Tools::getValue('plpn').".html";

  • Like 1

Share this post


Link to post
Share on other sites

can someone give a better set of instructions how to fix links. Please

 

I have fixed most of the errors i am just stuck on links and I believe when adding tags in posts I get an error also.

 

Any help would be appreciated as I am tired, wore out, and really need the blog on our site so I can move on to other issues that need solving.

 

Thanks in advance for the help I will definitely pay it forward.

Share this post


Link to post
Share on other sites

Hello Wax100

Could you please explain us in details how you manage to make this module works with

Presta 1.5.3. ?

What is the source file to download ?

How to install files ?

What are the files we have to modify ?

 

Thank you very much.

Share this post


Link to post
Share on other sites

Blank page on front end when installing... Now the posts show up in backend, but on front end just blank, no error messages with debug on. The same thing with 2 shops, both on 1.5.3. Installed blog version here http://ge.tt/api/1/f...0/blob?download and plblog152v2.zip

 

 

Also tried this, but doesn't work...

 

wax100, Amour

In path_to_www/modules/plblog/PostObject.php on line 32 (depending on file version) change element type of $definiton array to self::TYPE_HTML:

'post_description' =>   array('type' => self::TYPE_HTML, 'lang' => true, 'validate' => 'isCleanHtml', 'required' => true),

 

Also who have problems with permalinks, you must do follow steps:

1. In .htaccess, change

#BLOG
RewriteRule ^(../)blog/all-post.html$ %{ENV:REWRITEBASE}modules/plblog/frontent/all-post.php [QSA,L]
RewriteRule ^(../)blog/([a-zA-Z0-9-]*)/([0-9]*)-([a-zA-Z0-9-]*).html$ %{ENV:REWRITEBASE}modules/plblog/frontent/details.php?plcn=$1&plidp=$2&plpn=$3&.php [QSA,L]
RewriteRule ^(../)blog/([0-9]*)_([a-zA-Z0-9-]*).html$ %{ENV:REWRITEBASE}modules/plblog/frontent/list-post.php?plidc=$1&plcn=$2&.php [QSA,L]
RewriteRule ^(../)blog/tag/([a-zA-Z0-9-]*)_([0-9]*).html$ %{ENV:REWRITEBASE}modules/plblog/frontent/list-tags.php?pltn=$1&plidt=$2&.php [QSA,L]

 

On

 

#BLOG
RewriteRule ^../blog/all-post.html$ %{ENV:REWRITEBASE}modules/plblog/frontent/all-post.php [QSA,L]
RewriteRule ^../blog/([a-zA-Z0-9-]*)/([0-9]*)-([a-zA-Z0-9-]*).html$ %{ENV:REWRITEBASE}modules/plblog/frontent/details.php?plcn=$1&plidp=$2&plpn=$3&.php [QSA,L]
RewriteRule ^../blog/([0-9]*)_([a-zA-Z0-9-]*).html$ %{ENV:REWRITEBASE}modules/plblog/frontent/list-post.php?plidc=$1&plcn=$2&.php [QSA,L]
RewriteRule ^(../)blog/tag/([a-zA-Z0-9-]*)_([0-9]*).html$ %{ENV:REWRITEBASE}modules/plblog/frontent/list-tags.php?pltn=$1&plidt=$2&.php [QSA,L]

 

2. In path_to_www/modules/plblog/frontent/controllers/DetailsController.php comment out the line 11 (depending on file version) in object Constructor:

//$this->php_self = "blog/".Tools::getValue('plcn').'/'.Tools::getValue('plidp').'-'.Tools::getValue('plpn').".html";

Edited by shopbebe (see edit history)

Share this post


Link to post
Share on other sites

Now I can't help, because working. Please, contact me in the evening (at 8 PM Moscow Time) wax100@rambler.ru . I'll install clear Prestashop and try to install plblog . Ok?

Share this post


Link to post
Share on other sites

I know for the most part all errors are just simple issues such as replacing all the executeS that are not using select statements need to be execute and vice versa. I got everything working so far but the tags throw an error and the links do not work. I will try this new copy and let everyone know. I will say though the structure and the module itself is brilliant. It is only the differences in systems that is preventing us from using it.

Share this post


Link to post
Share on other sites

ShopSaveNEarn, yes. I just replace executeS with execute.

Now I am trying to add an image to a new. I don't need tags, so I don't test them. Just delete

Share this post


Link to post
Share on other sites

Installed module on 1.4.7 without any issues evrything seemed to work OK as I was not logged in.

I wanted to see what the comment area was like so I logged in and no comment area.

I changed the option to allow unregistered users to leave comments then it shows.

However I do not want unregistered users to be able to leave comments but if I set to no then registered users can not leave comment either.

 

Anyone else have this issue.

Share this post


Link to post
Share on other sites

Hello all,

 

I'm using prestashop 1.5.0.17 and I have installed blog module version, what posted guymelef. Just one thing doesn't work and it is really important. If I click on the link to my post, category or view all button, than there comes 404 error page of my shop. I tried everything what is here written, but no solution works for me. I'm so depresed by that. Do anyone have any idea how to fix it?

Share this post


Link to post
Share on other sites

Installed module on 1.4.7 without any issues evrything seemed to work OK as I was not logged in.

I wanted to see what the comment area was like so I logged in and no comment area.

I changed the option to allow unregistered users to leave comments then it shows.

However I do not want unregistered users to be able to leave comments but if I set to no then registered users can not leave comment either.

 

Anyone else have this issue.

 

Well no answer to my post I even Emailed the Author from his website and have received no response.

So I guess the only thing left is to uninstall delete and look for another module that actually works as intended.

Shame because this seems like a good module but I don't want unregistered users to be able to leave comments I have to police.

Oh Well!

Share this post


Link to post
Share on other sites

I used this wonderful module with the 1.5.2 version of prestashop, now I'm updating to version 1.5.4, please can anyone tell me where to find the updated version? (if any)

 

thank you very much

Share this post


Link to post
Share on other sites

I have this error code: Notice: Undefined index: HTTPS in /home/intimecom/domains/intime.com/public_html/modules/plblog/frontent/controllers/ViewAllPostController.php on line 114

 

How to fix it please?

Share this post


Link to post
Share on other sites

I have this error when i try to access to "blog" to post a message

"Erreur HTTP 500 (Internal Server Error) : Une situation inattendue s'est produite tandis que le serveur tentait de traiter la demande." (An unexpected situation occurred while the server was attempting to fulfill the request).

 

What is happening ? how to fix this ?

I have lastest prestashop version 1.5.4.0

 

 

In the shop we can see, so it seems that it was install not that badly but why this error 500 when i want to post something?

 

Latest Posts

 

Wiev all

 

Blog categories

 

 

Blog tags"

Edited by Semara (see edit history)

Share this post


Link to post
Share on other sites

the attachement is working well.

 

I need to make changes on .htaccess as

RewriteRule ^blog/all-post.html$ %{ENV:REWRITEBASE}modules/plblog/frontent/all-post.php [QSA,L]
RewriteRule ^blog/tag/([a-zA-Z0-9-]*)_([0-9]*).html$ %{ENV:REWRITEBASE}modules/plblog/frontent/list-tags.php?pltn=$1&plidt=$2&.php [QSA,L]
RewriteRule ^blog/([a-zA-Z0-9-]*)/([0-9]*)-([a-zA-Z0-9-]*).html$ %{ENV:REWRITEBASE}modules/plblog/frontent/details.php?plcn=$1&plidp=$2&plpn=$3&.php [QSA,L]
RewriteRule ^blog/([0-9]*)_([a-zA-Z0-9-]*).html$ %{ENV:REWRITEBASE}modules/plblog/frontent/list-post.php?plidc=$1&plcn=$2&.php [QSA,L]

 

And comment out all those link in all controller php:

$this->php_self = "blog/".Tools::getValue('plcn').'/'.Tools::getValue('plidp').'-'.Tools::getValue('plpn').".html";

and the "if" statement 1 line before the above code

Share this post


Link to post
Share on other sites

I have the plblog module installed and almost working on 1.5.3. Unfortunatlly to view a post does not work. The dispatch / route is this way: blog/category/1-test.html.

Is this the correct dispatch/route or has it to be a different url? Like en/blog/category/1-test/html or something else? Thanks for any ideas / suggestions.

Share this post


Link to post
Share on other sites

Updated. At AdminPlCategory.php, AdminPlComment.php and AdminPlPost.php, try to comment out 2nd line:

 

 

Target 2nd line:

require_once (dirname(__FILE__).'/../../classes/AdminTab.php');

Replace with (simply comment out) :

//require_once (dirname(__FILE__).'/../../classes/AdminTab.php');

  • Like 1

Share this post


Link to post
Share on other sites

Thanks webbuttercookies. After making that comment the BackOffice > Blog page appear but it wont allow us to add any category, post or tag. Below update to classes>ObjectModel.php fix it:

 

public function validateFields($die = true, $error_return = false)
   {
       foreach ($this->def['fields'] as $field => $data)
       {
           if (!empty($data['lang']))
               continue;

           if (is_array($this->update_fields) && empty($this->update_fields[$field]))
               continue;

           $message = true;
           if (is_array($this->$field))
           {
               foreach($fieldItem as $this->$field)
               {
                   $message = $this->validateField($field, $fieldItem);
                   if ($message !== true)
                   {
                       if ($die)
                           throw new PrestaShopException($message);
                       return $error_return ? $message : false;
                   }
               }
           }
           else
           {
               $message = $this->validateField($field, $this->$field);
           }
           if ($message !== true)
           {
               if ($die)
                   throw new PrestaShopException($message);
               return $error_return ? $message : false;
           }
       }

       return true;
   }

 

The next issue is with Font Office where it doesn't display post or all post. Only 404 page returned. Prestapshop 1.5.4 seems to use a different format of the controller. Any idea?

Share this post


Link to post
Share on other sites

And try to disable the friendly url.

The module is working well without it.

Without friendly url the module works. But i need the friendly url, because other modules work with the friendly url.

Does anybody know how to get the blblog working with the friendly url?

Share this post


Link to post
Share on other sites

It looks like Link class not overriden for me, and thats why front page doesn't work.

 

UPD: Yes problem confirmed, if i move function from overriden directly to LinkCore class all ok.

 

UPD: Forgot about new autoloader. Deleting /cache/class_index.php got it working.

Edited by Newb (see edit history)

Share this post


Link to post
Share on other sites

It looks like Link class not overriden for me, and thats why front page doesn't work.

 

UPD: Yes problem confirmed, if i move function from overriden directly to LinkCore class all ok.

 

UPD: Forgot about new autoloader. Deleting /cache/class_index.php got it working.

 

Would this fix my dispatch problem with the post detail on the front page?

Share this post


Link to post
Share on other sites

Hi guys,

 

hmmm my plblog module is displaying posts from the first created to the last, is there anyway of reversing this to display the newest posts first?

 

Thanks in advance

  • Like 1

Share this post


Link to post
Share on other sites

I notice that Post doesn't save date create. So if someone have same problem, and need it for his shop. In File AdminPlPost.php i add it to displayForm (line 100)

// post_date_create
$this->displayDate('post_date_create', $row['post_date_create']);

And to file PostObject.php add this

//AFTER THIS LINE
'post_status' =>	 array('type' => self::TYPE_BOOL, 'validate' => 'isBool'),
//ADD THIS LINE
'post_date_create' =>  array('type' => self::TYPE_STRING, 'validate' => 'isString'),

2 tamysis it'll help you too. For the moment it try to take posts ordered by time, but time is empty.

 

UPD: sry missed one line more

//AdminPlPost
//AFTER THIS LINe
'post_status' => array('title' => $this->l('Status'), 'align' => 'center', 'active' => 'status', 'type' => 'bool'),
//ADD THIS
'post_date_create' => array('title' => $this->l('Date create'), 'width' =>100),

Edited by Newb (see edit history)

Share this post


Link to post
Share on other sites