Jump to content

[Module] Free Blog Module - A usefull PrestaShop Module


SONIC PEAN
 Share

Recommended Posts

Found it myself, I discovered that on another Prestashop, same version, it worked.

 

These are the lines to be added (you can do it manually in the Tools->Generators page)

 

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

 

Hello,

I have to install the module on my shop http://www.naturessenza.net/ which is PrestaShop 1.4.8.2 but it doesn't work.

 

I think the problem is it doesn't cope with with friendly urls (you keep on getting 404 errors).

 

I have regenerated .htaccess as the README file suggests, but in my opinion this module does not add the necessary lines to the file so friendly urls won't work.

 

Any fix?

  • Like 4

Share this post


Link to post
Share on other sites

Cleoni, you are a genius! I worked just fine for me.

 

For those who is getting an error image when submitting the comment, just add in DetailsController.php, line 69 and 89 this: ..

 

It's this way:

'/img/admin/ok2.png'

 

It will be this way:

'../img/admin/ok2.png'

Share this post


Link to post
Share on other sites

Hi everybody, thanks for this nice module,

 

i have a little problem with the plblog module, would you like to help me to resolve it ?

 

I have an other module named jukebox who work perfectly except on the blog pages.

I have the home page in my jukebox window module (right column) when i'm on blog pages,

 

I don't know what is the problem, what do you think about ?

 

Link of my problem : found solution, put an absolute url in place of the relative url in my jukebox module because it's called in a "iframe".

 

 

Thank you.

Edited by thimy (see edit history)

Share this post


Link to post
Share on other sites

Hello, excellent module. Thank you for sharing!

 

The module does not appear in the right column. Only appears in the left column. When I try to change the module position for the right in the live edit, everything runs fine, but then he will not appear on the front office. How do I fix this?

Share this post


Link to post
Share on other sites

Hi,

 

thanks for this moddule.

 

the installation seems to be ok, I wrote some text to test it... but on the website, when I clic on "latest post" (or every link of this module) I get "404 not found"

Any idea of what to do to fix it?

 

Regards

Share this post


Link to post
Share on other sites

Hi,

 

I installed this module ,the problem is there is no html codes. The codes are not working.

for example, i write this

 

on the blog post it will show: i write this.

 

Thanks

 

any idea? thanks

Share this post


Link to post
Share on other sites

Can no one answer the issue regarding only a blank page showing when you click on the link to a post? I have installed and all appears fine. I create categories and then posts to place in those categories - all good. The posts and categories are displayed in the left column block; however, when I click on a link to a post, all I get is a blank, white page. Seems quite a few people have encountered this but no one has answered with any suggestions or solutions. Oh, and yes, .htaccess has been regenerated and contains necessary lines.

 

I would love to use this module but as it is, it doesn't work properly.

 

Please; can someone help with this issue????

 

**EDIT** (22nd Aug 2012)

Here are my rewrite entries for the module in the .htaccess file:

 

RewriteRule ^blog/all-post.html$ /modules/plblog/frontent/all-post.php [QSA,L]

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

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

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

Edited by Austra02 (see edit history)

Share this post


Link to post
Share on other sites

Hi,

 

thanks for this moddule.

 

the installation seems to be ok, I wrote some text to test it... but on the website, when I clic on "latest post" (or every link of this module) I get "404 not found"

Any idea of what to do to fix it?

 

Regards

 

SEO & URLs

checks the url friendly, and also blog posts generated at all.

Unless you have deleted any categories of posts, in which case the information will remain temporarily in the 'recent posts' before the new posts appear.

Share this post


Link to post
Share on other sites

Hi,

 

thanks for this moddule.

 

the installation seems to be ok, I wrote some text to test it... but on the website, when I clic on "latest post" (or every link of this module) I get "404 not found"

Any idea of what to do to fix it?

 

Regards

 

Same problem with me. Any solution?

Share this post


Link to post
Share on other sites

Found it myself, I discovered that on another Prestashop, same version, it worked.

 

These are the lines to be added (you can do it manually in the Tools->Generators page)

 

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

 

wow!!! its work. thank you.

  • Like 1

Share this post


Link to post
Share on other sites

Anyone managed to remove the TIME the post was created ? its kind of confusing the days and the time next to it ...

 

It isnt in the .tpl there is a post_date_create code but i couldnt find a way to remove only the Hour it was posted...

 

Anyone ?

 

Thnx

 

{$post['post_date_create']|date_format:"%d. %m. %Y"}

  • Like 1

Share this post


Link to post
Share on other sites

  • 2 weeks later...

Dear all,

 

Can anyone please help me? All links from this module keep directing me to Page Not Found after I upgraded to Prestashop V1.5.

 

Initially an example link was mydomain/en/blog/blogCategoryName/1-blogPostTitle.html

Now the same post link will show mydomain/index.php?controller=blog/blogCategoryName/1-blogPostTitle.html when the link is hovered, but will direct to 404 page when it is clicked on.

 

Can anyone please help? Thanks a million!

  • Like 1

Share this post


Link to post
Share on other sites

I have the same problem, need help please!

 

You must regenerate the .htaccess file in regenerate section. It's necesary for the new Blog urls are visible for your site.

 

You must enable the forze recompile smarty for check the changes.

  • Like 1

Share this post


Link to post
Share on other sites

Dear all,

 

Can anyone please help me? All links from this module keep directing me to Page Not Found after I upgraded to Prestashop V1.5.

 

Initially an example link was mydomain/en/blog/blogCategoryName/1-blogPostTitle.html

Now the same post link will show mydomain/index.php?controller=blog/blogCategoryName/1-blogPostTitle.html when the link is hovered, but will direct to 404 page when it is clicked on.

 

Can anyone please help? Thanks a million!

 

Hi,

 

Has anyone found a solution to getting the blog to work with prestashop 1.5.0.17 ?

 

really need this,much appreciated anyone who can help.

  • Like 1

Share this post


Link to post
Share on other sites

You must regenerate the .htaccess file in regenerate section. It's necesary for the new Blog urls are visible for your site.

 

You must enable the forze recompile smarty for check the changes.

 

Ok thanks, but it's necessary to activate URL rewriting in the server?

 

I'm using Prestashop 1.5.0.17 by the way.

Share this post


Link to post
Share on other sites

Hello Guys.

 

I did also have the problem with the urls - I have friendly url and permanent links. I think that was the problem.

 

All I did, so it did work, was to generate ".htaccess" at back office -> tools -> generators.

 

I hope this will help you

  • Like 1

Share this post


Link to post
Share on other sites

Hi,

 

I have a little problem with your module.

 

I added a hook to display another module. There is no problem with the others pages but when I want to open a blog page, I have the error

 

[php Notice #8] Undefined variable: HOOK_HEADER_BOTTOM (/Users/Mehdi/Sites/doggycenter/tools/smarty/sysplugins/smarty_internal_data.php, line 291)

 

Do you know where it come from ?

 

Thanks

 

EDIT : Ok, I found where it come from... I had to add the new hook in the controller php file

Edited by Mehdib92 (see edit history)

Share this post


Link to post
Share on other sites

Hello,

 

thanks a lot for the module. Everything is working great, but I can't edit the seo & urls for these sites:

 

blog/frontent/list-post.php?plidc=$1&plcn=$2&.php

27modules/plblog/frontent/details.php?plcn=$1&plidp=$2&plpn=$3&.php

28modules/plblog/frontent/list-tags.php?pltn=$1&plidt=$2&.php

29modules/plblog/frontent/all-post.php

 

I want to change the title and the description. I've tried it through the Backend and phpmyadmin.

 

Has anybody the same problem or maybe a solution? Some help would be very nice.

Edited by CroMag (see edit history)

Share this post


Link to post
Share on other sites

looked good.. the installation was easy and the coonfiguration was easy too..

it also showed correctly in my left sidebar.. but i couldn't read the new posts..

when i click the title or "view all" the URL changes but i always see the startpage..

using PS 1.5.0.17 (No SEO URLs)

  • Like 2

Share this post


Link to post
Share on other sites

Apparently i will not load this module because I see this person that developed it has not logged into account in over a month so looks like there is no support for issues.

 

What a shame i would have loved to use this module but apparently there's many issues that need to be fixed especially with seo/url's

  • Like 1

Share this post


Link to post
Share on other sites

Nice work guys. Cool module.

 

If anyone would like to change hook part of this Blog (left or right column) + changes in html and css this should work (example for latest posts):

 

1. change hook id in hook_module database table

2. change function name in plblog.php (ex. if you would like to use your rightColumn block in home block change function hookRightColumn to hookHome)

3. maybe some changes in template files, not sure about it, but works on my presta 1.4

 

and thats it :)

 

writing this as I am usuing matrice theme, which sets left and right column on every single page of your shop, I needed blog only on my home page

Edited by kleeb (see edit history)

Share this post


Link to post
Share on other sites

Found nothing in Back office... :(

i'm using 1.4.3 prestashop version...

i've installed it correctly just like the hint in previous post..

is there something wrong? or maybe it doesn't suit 1.4.3 version?

 

can someone help me with this module, please... :(

Share this post


Link to post
Share on other sites

You must regenerate the .htaccess file in regenerate section. It's necesary for the new Blog urls are visible for your site.

 

You must enable the forze recompile smarty for check the changes.

 

Hi. I have the same problem, how do I regenerate .htaccess in Presta 1.5? There is not any "generators" option in Presta 1.5.

Share this post


Link to post
Share on other sites

First of all, sorry for my english if I make any grammar mistake. I am from Argentina and my English sometimes it´s not good.

 

I need to know how can I duplicate this module. Basically I need to have it working 3 times.

 

Why?

 

I need to install on my website 3 boxes with post of diferent kind. Somethig like this:

 

Imagine 3 boxes on the right sidebar:

- The first box will show the last post about the category X (just the last one).

- The second box will show the last 3 post about the category Y.

- The thirst box will show the last 5 post about the category Z.

 

Each box must be really independet from the other two. Each one show a diferent numer of post. Also, the 3 boxes will have little differences of css design.

 

That´s why I need to install de module triplicated. I tried changing the names of the php´s files and table´s name in the MySQL with no success.

 

If anybody can give a solution without make the re-instalation technique, I open to listen.

 

Thanks 4 all, this is a great module.

Share this post


Link to post
Share on other sites

Found it myself, I discovered that on another Prestashop, same version, it worked.

 

These are the lines to be added (you can do it manually in the Tools->Generators page)

 

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

Спасибо, только Ваш совет помог!

Plblog работает с включенным SEO в prestashop 1.4.8.2

Share this post


Link to post
Share on other sites

  • 3 weeks later...

I made modifications and I've got the blog running in my localhost.

 

Here is the updated files

http://www.zubuweb.com/download/plblog.rar

 

There is a problem though in my remote test server. It only displays a blank page. Maybe because of the different server configuration and php version. I am still trying to find out though, But before I'll be messing out the running code I am sharing this to see if it could help anyone.

 

Feel free to download and give us an update if it did work.

Share this post


Link to post
Share on other sites

I made modifications and I've got the blog running in my localhost...

...Feel free to download and give us an update if it did work.

 

Hi guymelef. Thanks for the updated version, it seems to be working OK with 1.5.2 now.

I've only just started using Prestashop but I assume the 1.4 versions didnt have WYSIWYG editing for the Blog entries either?

 

BTW, For the blank pages problem - enable php error logging and you will get a better idea (might be permissions or timeouts).

Edited by Holspeed (see edit history)
  • Like 1

Share this post


Link to post
Share on other sites

I made modifications and I've got the blog running in my localhost.

 

Here is the updated files

http://www.zubuweb.c...load/plblog.rar

 

There is a problem though in my remote test server. It only displays a blank page. Maybe because of the different server configuration and php version. I am still trying to find out though, But before I'll be messing out the running code I am sharing this to see if it could help anyone.

 

Feel free to download and give us an update if it did work.

I try to install the plugin and that part is working, but after a refresh of my webpage it didn't startup. It seems that the index.php is not working anymore )-;. Is this a general problem or special for me ? (-;

Share this post


Link to post
Share on other sites

The blank pages is a 500 error, which can be seen if you turn on error checking.

The problem is some bad paths in the 4 of the tpl files. Not an issue on my AppServ test server but errors on my Centos VPS.

 

Edit the following files:

 

post-all.tpl

post-detail.tpl

post-list.tpl

post-tag.tpl

 

and remove the . from the the lines that look like this:

{include file="$module_path./filename.tpl"}

 

Attached is the complete module that you can install normally through Add Module in the Back Office. There may be more bugs but seems to be working as expected in 1.5.2.

plblog15b.zip

  • Like 2

Share this post


Link to post
Share on other sites

Thank you very much, Holspeed. :wub:

Now i have one question again, how to make url :

xxxxxxxxxxx..com/modules/plblog/frontent/list-post.php?plidc=2&plcn=kategori-1

 

to : xxxxxxxxxxx..com/blog/thisispostsubject

 

Its possible to change it ?

 

_________________________________________

 

I found new trouble when installing plblog :

This is a normal authentication form.

normal.png

But when i'm install the plblog modules , it change to :

 

 

error.png

Can someone help me ? I'm using a default theme

Edited by aMeLia2789 (see edit history)

Share this post


Link to post
Share on other sites

Thank you very much, Holspeed. :wub: Now i have one question again, how to make url : xxxxxxxxxxx..com/modules/plblog/frontent/list-post.php?plidc=2&plcn=kategori-1 to : xxxxxxxxxxx..com/blog/thisispostsubject Its possible to change it ?

 

It looks like plblog isnt working correctly for URL re-writting. I dont know much about mod_rewrite but I will look into it. Maybe somebody else knows how it all works and can offer a fix in the meantime?

 

I found new trouble when installing plblog : This is a normal authentication form. (images removed). Can someone help me ? I'm using a default theme

 

That one is easier, the plblog css file is overriding global.css.

Open modules/plblog/frontent/css/style.css

Scroll down and find: .std

Delete it and everything after. Save.

  • Like 1

Share this post


Link to post
Share on other sites

Now i just have one problem with mod_rewrite for url friendly (SEO & URL's at backoffice) with pretashop version 1.5.2.

 

I have this working, although its not ideal. The module obviously needs recoding to work with the 1.5 SEO system but this is beyond my scope.

This is what I did:

Turn on Friendly URL from the Back Office and then open the .htaccess file (in the root folder of your shop).

Add the following lines at the very top of the file (they must not be in the main part else they will get deleted if you turn off/on Friendly URLs).

 

RewriteEngine on

RewriteCond %{HTTP_HOST} ^your_store.com$

RewriteRule . - [E=REWRITEBASE:/your_dir/]

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]

 

Edit the parts marked in Red to match your site (You'll see the same lines repeated a little further down with the correct information).

As I said, it isn't the correct way to do it, but it does work.

 

The Blog breadcrumb link will still give you a missing page error, but you can fudge a fix by editing modules/plblog/frontent/tpl/breadcrumb.tpl

 

Find (around line 10):

<a title="{$path['name']}" href="{$path['link']}">{$path['name']}</a>

 

And Change it to:

<a title="{$path['name']}" href="{$base_dir}blog/all-post.html">{$path['name']}</a>

 

 

How this module look in v1.5.2? I can't find a link to write a new post at admin page.

 

Download the version I posted a few days ago (http://www.prestasho...ost__p__1026262) and do the edits I've suggested since.

 

EDIT: Perhaps I misunderstood and you have it installed but don't know where to add blog posts? You can find it in the Back Office under Catalog -> Blog :)

Edited by Holspeed (see edit history)

Share this post


Link to post
Share on other sites

I have this working, although its not ideal. The module obviously needs recoding to work with the 1.5 SEO system but this is beyond my scope.

This is what I did:

Turn on Friendly URL from the Back Office and then open the .htaccess file (in the root folder of your shop).

Add the following lines at the very top of the file (they must not be in the main part else they will get deleted if you turn off/on Friendly URLs).

 

RewriteEngine on

RewriteCond %{HTTP_HOST} ^your_store.com$

RewriteRule . - [E=REWRITEBASE:/your_dir/]

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]

 

Edit the parts marked in Red to match your site (You'll see the same lines repeated a little further down with the correct information).

As I said, it isn't the correct way to do it, but it does work.

 

The Blog breadcrumb link will still give you a missing page error, but you can fudge a fix by editing modules/plblog/frontent/tpl/breadcrumb.tpl

 

Find (around line 10):

<a title="{$path['name']}" href="{$path['link']}">{$path['name']}</a>

 

And Change it to:

<a title="{$path['name']}" href="{$base_dir}blog/all-post.html">{$path['name']}</a>

 

 

Added this fields into file? bu it doen't help for me. Continue recieving "page not found"

Share this post


Link to post
Share on other sites

Added this fields into file? bu it doen't help for me. Continue recieving "page not found"

Cache may need clearing. Back Office -> Performance -> Cache. Turn it off and hit Save.

It pays to leave it off and set Template cache to Force compilation when working on files.

Share this post


Link to post
Share on other sites

Cache may need clearing. Back Office -> Performance -> Cache. Turn it off and hit Save.

It pays to leave it off and set Template cache to Force compilation when working on files.

in my .htaccess file

Cache disabled.

RewriteRule . - [E=REWRITEBASE:/your_dir/] - in my .htaccess file written "RewriteRule . - [E=REWRITEBASE:/]". In your fields i need to write another dir?

Share this post


Link to post
Share on other sites

I've attached a jpg of my .htaccess

 

Line 9 and down are Prestashop generated. I added lines 1 to 7 at the top (so they dont get overwritten).

Note that lines 1 to 3 should be exactly the same as lines 14 to 16.

 

Apart from that I really dont know, I'm sure I've done nothing else and its working for me.

 

EDIT The image viewer here doesnt appear to work..

 

EDIT And the software makes double posts.. o,O

post-440625-0-98874600-1354877987_thumb.jpg

Edited by Holspeed (see edit history)