Page 1 of 1

Blog Module

Posted: Sun May 28, 2006 11:57 pm
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

Re: Blog Module

Posted: Fri Jun 02, 2006 10:00 pm
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.

Re: Blog Module

Posted: Sat Jun 03, 2006 12:14 am
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.

Re: Blog Module

Posted: Sat Jun 03, 2006 7:05 am
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

Re: Blog Module

Posted: Sat Jun 03, 2006 9:01 am
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.

Re: Blog Module

Posted: Sat Jun 03, 2006 1:18 pm
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

Re: Blog Module

Posted: Mon Jun 05, 2006 4:21 am
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

Re: Blog Module

Posted: Tue Jun 06, 2006 5:09 pm
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

Re: Blog Module

Posted: Tue Jun 06, 2006 9:33 pm
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

Re: Blog Module

Posted: Wed Jun 07, 2006 7:16 am
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

Re: Blog Module

Posted: Wed Jun 07, 2006 12:38 pm
by Dr.CSS
no?

[attachment deleted by admin]

Re: Blog Module

Posted: Thu Jul 06, 2006 12:08 am
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