FAO Mark - Your Blog Module

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
NickR

FAO Mark - Your Blog Module

Post by NickR »

Hi

I am interested in using your blog module, I have read it is based on the news module and relies on comments.

What changes did you make to the news module ?

Thanks Nick
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: FAO Mark - Your Blog Module

Post by Dr.CSS »

reworded it and a couple other things, see it in action...
http://www.multiintech.com/index.php?page=blogger
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: FAO Mark - Your Blog Module

Post by Dr.CSS »

sorry i needed to let it be known the tag at the bottom of the Detail template should look like this, and you need the Comments module :.


{if $return_url != ""}
{$return_url}
{/if}  id emailfield=1 websitefield=1 spamprotect=1 notify="you@yoursite.com"}

emailfield=1, websitefield=1, spamprotect=1, are optional parameters for Comments, the number 1 turns them on...

to get a count of the comments you need a User Defined Tag, call it count or whatever, it looks like this...

global $gCms;

$db = &$gCms->db;

// Get number of comments
$q = "SELECT * FROM ".cms_db_prefix()."module_comments WHERE  page_id =".$params['theid'];
$dbresult = $db->Execute( $q );
if( !$dbresult )
{
    echo 'DB error: '. $db->ErrorMsg()."";
}
$num_rows = $dbresult->RecordCount();
echo $num_rows;

and it goes in the Comment Display Template, like so... {$addcomment} [{count theid=$entry->id}]
theid is just the name i gave it you can call it what you want...
[  ] these will surround the number of comments, you can leave them in or change them if you want, it will look like this Comments [5]
if you don't leave a space between these.:  {$addcomment} [{coun  :.your number will be touching the word Comments 

sorry i didn't explain this before, i wasn't sure anyone wanted to use this as a module so i just used it my self,  hope this helps...

  mark
parisja

Re: FAO Mark - Your Blog Module

Post by parisja »

Hey nice work for the blog module.

I'll be using this soon once I get more of my site up!
badhoy

Re: FAO Mark - Your Blog Module

Post by badhoy »

Mark, could you past the code for the entire Detail template please.  I seem to have messed mine up.  Thanks.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: FAO Mark - Your Blog Module

Post by Dr.CSS »

this is what mine looks like ... YMMV... there should be a restore to defaults button at the bottom of the default template page, clik and you got the original default template...
Note: you need Comments module installed for visitors to leave Comments and it is a good idea to have the spamprotect=1 it can stop spambots from over running your comments box ...
Note 2: you can modify the Comments module template to use a text area editor like tinyMCE editor with the ability to format text and add smileys  ;)  to the comments...
Note 3: the email add. at the bottom of this needs to be modified to reflect an email add. you want the notification sent to and you need CMSMailer installed for this to work...

{$entry->title}

{if $entry->category}

{$entry->category}

{/if}

{if $entry->formatpostdate}

{$entry->formatpostdate}

{/if}

{if $entry->summary}


{eval var=$entry->summary}


{/if}

{if $entry->author}

{$entry->author}

{/if}


{eval var=$entry->content}





{if $return_url != ""}
{$return_url}
{/if}{cms_module module='comments' modulename='Blog' pageid=$entry->id emailfield=1 websitefield=1 spamprotect=1 notify="you""at""yoursite""dot""com"}
badhoy

Re: FAO Mark - Your Blog Module

Post by badhoy »

Cool, thanks.  Love this module btw
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: FAO Mark - Your Blog Module

Post by Dr.CSS »

your welcome..
it's realy just a slight rewrite of the News module..
i had a client who had to have this so...
i should rewrite the default template and add these notes in the help section...
Last edited by Anonymous on Fri Jul 21, 2006 12:09 am, edited 1 time in total.
User avatar
zounars
Forum Members
Forum Members
Posts: 41
Joined: Tue Jun 20, 2006 11:38 am
Location: Italy

Re: FAO Mark - Your Blog Module

Post by zounars »

Mark,

I'm using cmsms 1.0beta3  8) and the blog module (2.0.3) dont work.

I've this message when going to blog page:
Fatal error: Call to a member function on a non-object in c:\program files\easyphp1-8\www\cmsms\modules\Blog\action.default.php on line 104

I have this in line 104: while ($row = $dbresult->FetchRow())

what can I do to fix this


[attachment deleted by admin]
http://www.lenetpourtous.com/ - Hosting and Website design
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: FAO Mark - Your Blog Module

Post by Dr.CSS »

I'm in the middle of trying to fix it now. I've got the same error.

  Thanks for your patience.
                                      mark
danster

Re: FAO Mark - Your Blog Module

Post by danster »

I'm kind of desperate, and was hoping for any advice you might have with the blog/comments module. I'm fairly comfortable with cmsms and know some PHP.

I've placed this mod tag
{cms_module module='blog' number="5" dateformat="%A %B %d, %Y" moretext='Comments'}
in this page.
http://www.scottpiatkowski.ca/index.php?page=blog

the summary shows up, but with no comments/more link at the bottom

i've placed this tag in the bottom of the Blog detail template
{cms_module module='Comments' modulename='Blog' spamprotect=1 pageid=$entry->id}{$addcomment}
when you click add comment, it takes you back to the summary page?

I'm using cmsms .13  Blog 2.0.3 Comments 1.5


I've been messin' with this for 3 days now. HELP!!!
User avatar
Elijah Lofgren
Power Poster
Power Poster
Posts: 811
Joined: Mon Apr 24, 2006 1:01 am
Location: Deatsville, AL

Re: FAO Mark - Your Blog Module

Post by Elijah Lofgren »

danster wrote: I'm kind of desperate, and was hoping for any advice you might have with the blog/comments module. I'm fairly comfortable with cmsms and know some PHP.

I've placed this mod tag
{cms_module module='blog' number="5" dateformat="%A %B %d, %Y" moretext='Comments'}
in this page.
http://www.scottpiatkowski.ca/index.php?page=blog

the summary shows up, but with no comments/more link at the bottom

i've placed this tag in the bottom of the Blog detail template
{cms_module module='Comments' modulename='Blog' spamprotect=1 pageid=$entry->id}{$addcomment}
when you click add comment, it takes you back to the summary page?

I'm using cmsms .13  Blog 2.0.3 Comments 1.5


I've been messin' with this for 3 days now. HELP!!!
Just a note to others. Danster and I worked this out via email. ;)
Note: I don't have time to take on any more projects. I'm quite busy. I may be too busy to reply to emails or messages. Thanks for your understanding. :)
badhoy

Re: FAO Mark - Your Blog Module

Post by badhoy »

The line 104 error just popped up for me on one of my web sites.
Fatal error: Call to a member function on a non-object in /home/thehoyts/public_html/modules/Blog/action.default.php on line 104
I also get this error when trying to edit my Categories in the Blog module.
Fatal error: Call to undefined function: rowcount() in /home/thehoyts/public_html/modules/Blog/Blog.module.php on line 480
Is there a fix for this yet?  I am running 1.0.2
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: FAO Mark - Your Blog Module

Post by Dr.CSS »

That was for older ver. of CMSMS it's just as easy to use the News module now...

But if you want to use it go to /modules/Blog/Blog.module.php and on line 480 change rowcount to recordcount...

You need to look thru the whole file for Row/rowcount and and change them all, be sure to check for upper/lower case it's case sensitive...
badhoy

Re: FAO Mark - Your Blog Module

Post by badhoy »

Thanks for the quick response Mark.  I take it the preferred approach is now using the News Module with the comments Module.  Is there some documentation/discussion about how to best implement this?
Locked

Return to “Modules/Add-Ons”