PrestaShop Forum

The best place in the world to ask questions about PrestaShop and get advice from our passionate community!

PrestaShop Forum

Jump to content

[CONTRIBUTION] News module/mod

614 replies to this topic
#1
Eihwaz

    PrestaShop Apprentice

  • Members
  • PipPip
  • 154 posts

Read this first, for legal reasons (don't worry, the modules are still free):


Warranty


All modules, themes or modifications are provided "as is", without a warranty of any kind, either express or implied, including, but not limited to, the implied warranties of merchantability or fitness for a particular purpose, or the warranty of non-infringement. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the modules or the use or other dealings in the modules.

Permission


The author is hereby granted permission, to the user of these modules, themes or modifications to use freely in association with Prestashop. The users are free to use/edit/modify these modules in anyway he/she see fit. However, the users are NOT allowed to redistribute, provide download link, or display download link of these modules, themes, or modifications to his/her blog, Forum, or website of any kind in anyway or send out modules, themes, or modifications to the third party by email or resell or redistribute these modules, themes, or modifications to exchange any intangible, tangible or monetary value with its original format. All of download links have to be in the original place http://www.eihwazblo...p?id_category=1

Disclaimer


Please back up your files and the database before you install the modules, themes, or modification. In the event if you break your site, YOU agree to indemnify and hold the developer harmless from any and all damages of your website.
You download the modules, themes, or modification at your own risk. By downloading the files you agree to not hold anybody but yourself responsible for anything that may come as a result of the use of the modules, the themes, or modification.

And now to the modules:


Remember I said that soon these modules will be moved to my blog? The time has come :) You can get them all here. I didn't have much time to describe them properly or prepare pictures for all of them, will fix ASAP.

#2
Star

    PrestaShop Addict

  • Members
  • PipPipPip
  • 618 posts
Hi Eihwaz,

Thanks for the mod. However, the download link gives error. :-S

#3
Eihwaz

    PrestaShop Apprentice

  • Members
  • PipPip
  • 154 posts
Thank you, I've just updated the link, it should work fine now, sorry about that :)

#4
Star

    PrestaShop Addict

  • Members
  • PipPipPip
  • 618 posts

From 1267894403:

Thank you, I've just updated the link, it should work fine now, sorry about that :)


Thank you for the mod. I like your appoach, very easy and simple. I am the wrost programmer. I learned a lot from you. Thank you again.

#5
google-friend

    PrestaShop Apprentice

  • Members
  • PipPip
  • 66 posts
this news module is great. I will use it for my blog. Is that a way we can have a block on the left column to automatically show the last 10 newest news? And a block that link to a calendar that link to the news just link the wordpress? If we have this two above function, I will use this "news- blog" to replace my wordpress. Keeping up one appication is better than keeping two.

Thank you very much for the module.

#6
Eihwaz

    PrestaShop Apprentice

  • Members
  • PipPip
  • 154 posts
It already contains module to show recently added news, you need to activate it in your BO. I don't know about calendar module though, probably I will get to it at some point, but not in the nearest future, but there soon will be a surprise for everyone using this modification, just wait for it :)

#7
google-friend

    PrestaShop Apprentice

  • Members
  • PipPip
  • 66 posts

From 1267986596:

It already contains module to show recently added news, you need to activate it in your BO. I don't know about calendar module though, probably I will get to it at some point, but not in the nearest future, but there soon will be a surprise for everyone using this modification, just wait for it :)


I can not take any more surprise from you, man. :cheese: Everything is too good to be true from you. I am using your order step mod too. It wor so well.....

Thankou for all the mods.

#8
google-friend

    PrestaShop Apprentice

  • Members
  • PipPip
  • 66 posts
I did everything you stated above. And at the tab secion on the BO, I don't see how I can add news.

Attached Files



#9
Jack

    PrestaShop Apprentice

  • Members
  • PipPip
  • 239 posts
I got the same error. May be I am missing something?

This is a great module. I love it. Thanks.

#10
Eihwaz

    PrestaShop Apprentice

  • Members
  • PipPip
  • 154 posts
Ok, here it is: it's a comment module for this blog/news thing.

Please only install if you're using news mod from the first post


I didn't plan this at the very beginning, so we'll need to change few files.
Create a new hook in your database:

INSERT INTO `ps_hook` (`name`,`title`) VALUES ('blogComments', 'Hook for comments in the news');

Open blog.php file (root directory), line 17, change

$smarty->assign(array(
'blog' => $blog,
'content_only' => intval(Tools::getValue('content_only'))
));

to

$smarty->assign(array(
'blog' => $blog,
'content_only' => intval(Tools::getValue('content_only')),
'HOOK_BLOG_COMMENTS' => Module::hookExec('blogComments')
));

Open your theme's blog.tpl file, find:


{$blog->date_add} {l s=$blog->meta_title}


{$blog->description_short}
{$blog->content}


And after the
add this line:

{$HOOK_BLOG_COMMENTS}

Now copy the module (see the link in the beginning of this post) to your modules dir and install it as usual.
Don't forget that it's a v.0.1 :)


#11
Eihwaz

    PrestaShop Apprentice

  • Members
  • PipPip
  • 154 posts
google-friend, Jack, are you sure you didn't forget to run that mysql query?
Because it's the only reason I can think of right now, but I'll check again. Also, what PS version are you using?

#12
google-friend

    PrestaShop Apprentice

  • Members
  • PipPip
  • 66 posts
I use 1.2.5. I just attach my SQ image. I am sure the DB is there.

Attached Files



#13
Newest

    PrestaShop Apprentice

  • Members
  • PipPip
  • 101 posts
I got the same error. What should I hook my blog at the BO? I assigned the parent selection to home. Am I doing it right?

Attached Files



#14
Jack

    PrestaShop Apprentice

  • Members
  • PipPip
  • 239 posts
I am using 1.25 and I tried it on 1.3 also. It gave me the same error.

It is wonderful of you to share this module. Thank you again.

#15
Eihwaz

    PrestaShop Apprentice

  • Members
  • PipPip
  • 154 posts
I'm missing something, I just installed it on 1.25 successfully using these instruction I've posted earlier (see the image).
That's the problem, I can't get this error to appear on my machine to sort it out. I'll keep trying though.

Attached Files

  • Attached File  proof.gif   14bytes   15220 downloads


#16
familyman

    PrestaShop Apprentice

  • Members
  • PipPip
  • 32 posts
I have followed the installation step by step, and I got the same error as others do. I am using 1.2.5 and I check my SQ and everything is there. I wonder if you have uploaded all the files?

#17
Eihwaz

    PrestaShop Apprentice

  • Members
  • PipPip
  • 154 posts
Could someone having this problem do this for me:
Open your classes/AdminTab.php and after line 127

$this->id = Tab::getCurrentTabId();

add this chunk:

var_dump(array(get_class($this), intval($this->id), intval($cookie->id_employee)));

Then refresh your News tab and post here what it says? Should be something like:

array(3) { [0]=> string(9) "AdminBlog" [1]=> int(69) [2]=> int(1) }

(The first one is a class name, the second is current Tab id, the third one is your administrator user id (which is most probably 1), so you're not posting anything that could allow someone to access your shop, don't worry)

#18
Jack

    PrestaShop Apprentice

  • Members
  • PipPip
  • 239 posts
This is what I got

Attached Files



#19
Eihwaz

    PrestaShop Apprentice

  • Members
  • PipPip
  • 154 posts
Wrong tab, you should enter News tab that you've created.

#20
Jack

    PrestaShop Apprentice

  • Members
  • PipPip
  • 239 posts
Here it is.

Attached Files