Change a Forums Scroll Block to WebBlog Scroll Block?

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   Change a Forums Scroll Block to WebBlog Scroll Block?
JoAnne
CZ Newbie
JoAnne has been a member for over 18 year's 18 Year Member
usa.gif newyork.gif
Gender: Female
Website:
Status: Offline
Joined: Oct 07, 2005
0.00 posts per day
Posts: 6
Points: 233
   
Hi Everyone

I have a simple Forums Scroll Block which I would like to convert to a WebBlog Scroll Block. Should be a simple enough task, but I am having trouble with it. I seem to be missing something.

I was wondering if anyone would be able to help me with this?

Thank You


JoAnne ~


[ Register or login to view links on this board.]

[ Register or login to view links on this board.]




Back to top Reply with quote
#2   re: Change a Forums Scroll Block to WebBlog Scroll Block?
floppydrivez
CZ Addict
 Codezwiz Site Donator
floppydrivez has been a member for over 18 year's 18 Year Member
usa.gif mississippi.gif
Occupation: graphic design
Age: 42
Gender: Male
Website:
Status: Offline
Joined: Feb 26, 2006
0.08 posts per day
Posts: 518
Points: 4,848
AIM Address Yahoo Messenger MSN Messenger 
Could you post the code for the forums block or attach the block in a zip file. I will have a look.



Back to top Reply with quote
#3   Re: re: Change a Forums Scroll Block to WebBlog Scroll Block
JoAnne
CZ Newbie
JoAnne has been a member for over 18 year's 18 Year Member
usa.gif newyork.gif
Gender: Female
Website:
Status: Offline
Joined: Oct 07, 2005
0.00 posts per day
Posts: 6
Points: 233
   


Originally posted by floppydrivez @ Sun Sep 17, 2006 2:36 pm:

Could you post the code for the forums block or attach the block in a zip file. I will have a look.



Thank you so much floppydrivez! icon_biggrin.gif

ok... for some reason I was unable to add as an attachment, so here is the code:

<?php

if (eregi("block-ForumsScroll.php", $_SERVER['PHP_SELF'])) {
    Header("Location: index.php");
    die();
}

//include_once ('blocks/smileys.php');

global $prefix, $dbi, $sitename, $user, $cookie, $group_id;
$count = 1;
$amount = 10;
$content = "<A name= "scrollingCode"></A>";
$content .="<MARQUEE behavior= "scroll" align= "center" direction= "up" height="220" scrollamount= "1" scrolldelay= "25" onmouseover='this.stop()' onmouseout='this.start()'>";
$content .="<center> <STYLE="text-decoration: none"><font color="#666666"><b>Last $amount Forum Messages</b></center>";
$result1 = sql_query("SELECT topic_id, topic_last_post_id, topic_title FROM ".$prefix."_bbtopics ORDER BY topic_last_post_id DESC LIMIT $amount", $dbi);
$content .= "<br>";
while(list($topic_id, $topic_last_post_id, $topic_title) = sql_fetch_row($result1, $dbi)) {
$result2 = sql_query("SELECT topic_id, poster_id, FROM_UNIXTIME(post_time,'%b %d, %Y at %T') as post_time FROM ".$prefix."_bbposts where post_id='$topic_last_post_id'", $dbi);
list($topic_id, $poster_id, $post_time)=sql_fetch_row($result2, $dbi);

$result3 = sql_query("SELECT username, user_id FROM ".$prefix."_users where user_id='$poster_id'", $dbi);
list($username, $user_id)=sql_fetch_row($result3, $dbi);

//$topic_title = substr("$topic_title", 0,17);
//$topic_title=parseEmoticons($topic_title);
// Remove the comment below to add the counter
//$content .="<STYLE="text-decoration: none"><font color="#666666"><b>Message: $count<br></b>";

$content .= "<img src="modules/Forums/templates/subSilver/images/icon_mini_message.gif" border="0"alt=""><a href="modules.php?name=Forums&amp;file=viewtopic&amp;p=$topic_last_post_id#$topic_last_post_id"STYLE="text-decoration: none"><b> $topic_title </b></a><br><font color="#666666"><i>Last post by <A HREF="modules.php?name=Forums&file=profile&mode=viewprofile&u=$user_id"STYLE="text-decoration: none"> $username </a> on $post_time</i></font><br><br>";
$count = $count + 1;
}
$content .= "<br><center>[ <a href="modules.php?name=Forums"STYLE="text-decoration: none">$sitename ]</center>";
$content .= "</a>";
?>



Back to top Reply with quote
#4   re: Change a Forums Scroll Block to WebBlog Scroll Block?
floppydrivez
CZ Addict
 Codezwiz Site Donator
floppydrivez has been a member for over 18 year's 18 Year Member
usa.gif mississippi.gif
Occupation: graphic design
Age: 42
Gender: Male
Website:
Status: Offline
Joined: Feb 26, 2006
0.08 posts per day
Posts: 518
Points: 4,848
AIM Address Yahoo Messenger MSN Messenger 
These lines are the ones that need to be changed. Basically to pull the information from the db showing new blogs. Since I don't have this blog mod installed its gonna be kinda hard for me to guess at which tables contain this info.

$result1 = sql_query("SELECT topic_id, topic_last_post_id, topic_title FROM ".$prefix."_bbtopics ORDER BY topic_last_post_id DESC LIMIT $amount", $dbi);
$content .= "<br>";
while(list($topic_id, $topic_last_post_id, $topic_title) = sql_fetch_row($result1, $dbi)) {
$result2 = sql_query("SELECT topic_id, poster_id, FROM_UNIXTIME(post_time,'%b %d, %Y at %T') as post_time FROM ".$prefix."_bbposts where post_id='$topic_last_post_id'", $dbi);
list($topic_id, $poster_id, $post_time)=sql_fetch_row($result2, $dbi);

$result3 = sql_query("SELECT username, user_id FROM ".$prefix."_users where user_id='$poster_id'", $dbi);
list($username, $user_id)=sql_fetch_row($result3, $dbi);;


So in other words you need to indentify the tables being used for the blog mod before we can continue.


Back to top Reply with quote
#5   Re: re: Change a Forums Scroll Block to WebBlog Scroll Block
JoAnne
CZ Newbie
JoAnne has been a member for over 18 year's 18 Year Member
usa.gif newyork.gif
Gender: Female
Website:
Status: Offline
Joined: Oct 07, 2005
0.00 posts per day
Posts: 6
Points: 233
   
ok.... so I would just need the comparable codes from the bbweblog as to the ones used in the script for the forums, correct?

I should be able to figure that out ... at least I will be headed in the right direction :/

Thank You!


JoAnne ~



Back to top Reply with quote
#6   re: Change a Forums Scroll Block to WebBlog Scroll Block?
floppydrivez
CZ Addict
 Codezwiz Site Donator
floppydrivez has been a member for over 18 year's 18 Year Member
usa.gif mississippi.gif
Occupation: graphic design
Age: 42
Gender: Male
Website:
Status: Offline
Joined: Feb 26, 2006
0.08 posts per day
Posts: 518
Points: 4,848
AIM Address Yahoo Messenger MSN Messenger 
Exactly, please post back and let me know how it goes or if you have any other questions.



Back to top Reply with quote
#7   re: Change a Forums Scroll Block to WebBlog Scroll Block?
JoAnne
CZ Newbie
JoAnne has been a member for over 18 year's 18 Year Member
usa.gif newyork.gif
Gender: Female
Website:
Status: Offline
Joined: Oct 07, 2005
0.00 posts per day
Posts: 6
Points: 233
   


I finally had time to work on it and I did it! icon_wink.gif icon_mrgreen.gif

Thank You!


JoAnne ~


[ Register or login to view links on this board.]

[ Register or login to view links on this board.]







Back to top Reply with quote
#8   re: Change a Forums Scroll Block to WebBlog Scroll Block?
floppydrivez
CZ Addict
 Codezwiz Site Donator
floppydrivez has been a member for over 18 year's 18 Year Member
usa.gif mississippi.gif
Occupation: graphic design
Age: 42
Gender: Male
Website:
Status: Offline
Joined: Feb 26, 2006
0.08 posts per day
Posts: 518
Points: 4,848
AIM Address Yahoo Messenger MSN Messenger 
Very nice!



Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum