Jump to content

update on a blog script


mrdeleigh

Recommended Posts

Hi
I have a blog script below that calls for blogs made only with video, how can i create a page where it would display all video blogs in an admin screen so i can sellect the ones i want to display, and use the code below to display them?
thanks
mrdeleigh

[code]<?php

if(get_param("search_box") == "")
{ $strLatestVideos = '
<table cellspacing=1 cellpadding=0>
<tr>
<td class="right_block_table_first_TD" colspan="2">
&nbsp;LATEST VIDEOS
</td>
</tr>
';
$tableVideos = DataTable_Query("
SELECT author_image, date, ".$DBprefix."weblog.user, title, ".$DBprefix."notes.id
FROM ".$DBprefix."notes,".$DBprefix."weblog,".$DBprefix."admin_users WHERE ".$DBprefix."notes.user=".$DBprefix."weblog.user
AND ".$DBprefix."notes.user=".$DBprefix."admin_users.username
AND blog_active=1
AND category_id<>-1
".($SHOW_ONLY_NOTES_WITH_PHOTO?"AND author_image<>0":"")."
AND active='YES'
AND show_video=1
AND video<>''
AND
(".$DBprefix."notes.title LIKE '%".get_param("search_box")."%'
OR
".$DBprefix."notes.html LIKE '%".get_param("search_box")."%'
OR
".$DBprefix."notes.user LIKE '%".get_param("search_box")."%'
)
ORDER BY date DESC LIMIT 0,10");
}

$bColor = true;
$iCounter = 1;
while($arrLastBlog = mysql_fetch_array($tableVideos))
{
if(trim($arrLastBlog["title"]) == "")
{
continue;
}

if($iCounter > $NUMBER_LATEST_NOTES)
{
break;
}

if($arrLastBlog["author_image"] > 1)
{
$author = "<a href='http://".BlogUrl($arrLastBlog["user"])."' target=_blank>";

if($USE_GD)
{
  $author .= "<img src=\"thumbnail.php?id=". $arrLastBlog["author_image"]."&w=45&h=60\" width=45 height=60  border=0>";
}
else
{
  $author .= "<img src=\"image.php?id=". $arrLastBlog["author_image"]."&w=45&h=60\" width=45 height=60  border=0>";
}

  $author .= "</a>";
}
else
{
$author = "<img src=ADMIN/images/no_pic.gif width=45 height=60>";
}

if($arrLastBlog["user"] == "admin")
{
$strBlogger = '<font color=#d68449><b>'.strtoupper($arrLastBlog["user"]).'</b></font>';
}
else
{
$strBlogger = ''.$arrLastBlog["user"].'';
}
echo '



<tr bgcolor='.($bColor?'#ffffff':'#FAF9DA').'>
<td  width="59">'.date($PHP_HOUR_FORMAT,$arrLastBlog["date"]).'</td>
<td  width="296"><a href="'.CreateLink4($arrLastBlog["user"],'note/'.$arrLastBlog["id"],$arrLastBlog["title"]).'" target=_blank>'.stripslashes($arrLastBlog["title"]).'</a></td>
<td  width="99"><a href="http://'.BlogUrl($arrLastBlog["user"]).'" target=_blank>'.$strBlogger.'</a></td>
<td width=52>'.$author.'</td>
</tr>
';

$iCounter++;

$bColor = !$bColor;
}
$strLatestVideos .= '[/code]
Link to comment
https://forums.phpfreaks.com/topic/28754-update-on-a-blog-script/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.