Blog Module

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Blog Module

Post by Dr.CSS »

would anyone want me to make my "News" module hacked into "Blog" module available as a Module?...
if so do i need to submit it somewhere for eval. or use, or just put it on my site for download?...
used at new site as a strait up blog, mine at multiintech.com has a hacked up template, so i had to use it somewhere else to test it for standard use...

new site http://www.multiintech.com/debra/index. ... =blog  please don't leave any Comments on this site

mine http://www.multiintech.com/index.php?page=blogger  you can leave Comments here

it needs the Comments module, and a user defined tag to count the comments...

name it count or whatever... used like so...
{$entry->morelink} {count theid=$entry->id}     

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;

theid can be called whatever you want...

    mark
sloop

Re: Blog Module

Post by sloop »

Mark,

I'd definitely like to see that.  To upload it, go here:

http://dev.cmsmadesimple.org/account/login.php

Log in, then click on "Register Project"

http://dev.cmsmadesimple.org/register/projectinfo.php

and describe your work etc.
badhoy

Re: Blog Module

Post by badhoy »

I would be very interested in this as a module.  I've been playing with getting Wordpress linked into one of my web sites but am not really happy with the results.  I desire something native to CMSMS.
Russ
Power Poster
Power Poster
Posts: 813
Joined: Fri Nov 25, 2005 5:02 pm
Location: North West England

Re: Blog Module

Post by Russ »

mark, I had been thinking along the same lines, but before you begin your conversion, I would suggest a few things need to be changed in the current news module and comments.

1. For news, it need to start it's friendly url's from the calling page or a specified page. It think this will have to be the calling page, (it also needs to happen for Album). I was hoping to look at this but too much of my time was absorbed doing the Ajax and templates fro album (having to reconfigure the test site etc...)

2. Comments needs some more flexibility and when it sends a warning e-mail it does not use the current CMS url setting - so no friendly urls. Currently on our test site it produces a textarea or 80 - tooooo wide - but on cursory inspection I can't seem to change it.  I'm on version 1.6 so there maybe some newer ones?

3. All this is necsesary for things to work properly with search, sitemaps. Google sitmaos, RSS etc etc. Consistant friendly urls' weill be very cool indeed.

Obviously the blog would need to create it'w own database etc, but as you will be basing it on the news source, I think i'd wait for that to be up and running and stable?

Glad to help when I can.

Russ
Muzzy

Re: Blog Module

Post by Muzzy »

Excellent work Mark. Have spoken to you in the past about this and would love to see a finished module. My Minister is eagerly awaiting a Blog for our upcoming church site.

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

Re: Blog Module

Post by Dr.CSS »

coverted it already....
i've been using it for a month...
works fine....
the more link is now comments...
download here http://www.multiintech.com/index.php?page=blogger
enjoy  :D
User avatar
Elijah Lofgren
Power Poster
Power Poster
Posts: 811
Joined: Mon Apr 24, 2006 1:01 am
Location: Deatsville, AL

Re: Blog Module

Post by Elijah Lofgren »

Russ wrote: 1. For news, it need to start it's friendly url's from the calling page or a specified page. It think this will have to be the calling page, (it also needs to happen for Album). I was hoping to look at this but too much of my time was absorbed doing the Ajax and templates fro album (having to reconfigure the test site etc...)
I've done this for Album and put this on my todo list for News.
Russ wrote: 2. Comments needs some more flexibility and when it sends a warning e-mail it does not use the current CMS url setting - so no friendly urls.
I've fixed this in the SVN version of comments.
Russ wrote: Currently on our test site it produces a textarea or 80 - tooooo wide - but on cursory inspection I can't seem to change it.  I'm on version 1.6 so there maybe some newer ones?
What size textarea would be good? It's currently only changeable in action.addcomment.php
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. :)
Russ
Power Poster
Power Poster
Posts: 813
Joined: Fri Nov 25, 2005 5:02 pm
Location: North West England

Re: Blog Module

Post by Russ »

Hi Elijah

1. Good for Album, I've commented on the main album thread.

2. Downloaded the SVN of comments and tried it with e-mail - looked better

A new comment has been posted on page 'http://www.cms.shoesforindustry.net/cmsmodules/album/'.

Comment: Test Comment


But when I clicked the links it goes to:
http://www.cms.shoesforindustry.net/cmsmodules/album/'/
which is still not right?

3. Something like 30 I think. Where in action.addcomment.php can you change it? I can't see where. Try making a comment on this page and you will see what I mean. Very wide!
http://www.cms.shoesforindustry.net/cmsmodules/search/

Hope this helps,
Russ
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: Blog Module

Post by Dr.CSS »

comment box.... CSS

#commententry td .cntnt01{width:60%}  or whatever size you like, with the class called it will only effect that box in that template
Russ
Power Poster
Power Poster
Posts: 813
Joined: Fri Nov 25, 2005 5:02 pm
Location: North West England

Re: Blog Module

Post by Russ »

Actually Mark I had thought of that, but thanks. it doesn't of course work, it is setting a forms rows 'cols="80" rows="15" ' so that will be the width. I've only just noticed that the form need a lot of work as well, to remove the tables, and make it into a compliant accessible form.

Any other ideas?

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

Re: Blog Module

Post by Dr.CSS »

no?

[attachment deleted by admin]
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: 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
Post Reply

Return to “Modules/Add-Ons”