Calendar |
| | Su | Mo | Tu | We | Th | Fr | Sa | | | | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | | |
Today's Event |
| No events today |
|
New block Latest 5 active but... |
| alabkry2007 | 31/01/10 - 04:51:19 AM | #1 |
| Junior User
Joined: 31-Jan 10 From: Burundi Posts: 2 | Hi My Friends
I create New block For Latest 5 active (animated) but I find some error on some line on 57 line this is codeCode:
<?
/***************************************************************************
Jupiter Content System @ Jupiterportal.org
Copyright (C) 2005-2007 Cosmin Flavius (highstrike@gmail.com)
Copyright (C) 2008-2009 George Mark (gmark@jupiterportal.org)
This program is free software; you can redistribute it and/or modify it under the terms of the GNU
General Public License as published by the Free Software Foundation; either version 3 of the License,
or (at your option) any later version.
More Info About The License At http://www.gnu.org/copyleft/gpl.html
****************************************************************************/
function b_forum()
{
$name_function = "b_forum";
global $a, $db, $blocks_db, $template, $language, $config, $misc, $PHP_SELF, $is_loged_in, $is_moderator, $is_administrator, $is_webmaster, $months, $days, $m, $y, $OnlineGuestsCount, $OnlineMembersCount;
if(!file_exists("blocks/$name_function/language/{$config['language']}")) include "blocks/$name_function/language/ar.php";
else include "blocks/$name_function/language/{$config['language']}";
$random_code = md5("$name_function");
$random_code = substr("$random_code", 0, 5);
if(!isset($content)) $content = NULL;
if(!isset($_GET["$random_code"])) $_GET["$random_code"] = NULL;
if($_GET["$random_code"] == "on") $_SESSION["$random_code"] = "on";
elseif($_GET["$random_code"] == "off") $_SESSION["$random_code"] = "off";
$query_string = "?{$_SERVER['QUERY_STRING']}";
foreach($blocks_db as $blocks)
{
$block_code = md5("{$blocks['name']}");
$block_code = substr("$block_code", 0, 5);
$query_string = str_replace("&$block_code=off","", $query_string);
$query_string = str_replace("&$block_code=on","", $query_string);
}
if($query_string == "?" || strpos($query_string, '=on') !== false || strpos($query_string, '=off') !== false) $code_query = "?";
else $code_query = "$query_string&";
if(!isset($_SESSION["$random_code"]) || $_SESSION["$random_code"] == "on") $links = "<a href='$code_query$random_code=off'><img src='templates/$template/images/misc/minus.gif' border='0'> {$language_block['Forum title']}</a>";
elseif($_SESSION["$random_code"] == "off") $links = "<a href='$code_query$random_code=on'><img src='templates/$template/images/misc/plus.gif' border='0'> {$language_block['Forum title']}</a>";
$template_block = implode("", file("templates/$template/block.php"));
$template_block = str_replace("{template}", $template, $template_block);
$template_block = str_replace("{links}", $links, $template_block);
if(!isset($_SESSION["$random_code"]) || $_SESSION["$random_code"] == "on")
{
//-----------------------------------------------------------------
// Get Table + Restrictions
//-----------------------------------------------------------------
if(isset($is_moderator) || isset($is_administrator) || isset($is_webmaster)) $forum_topics = $db->getTable("SELECT f.id AS fid, f.type, f.cat, f.subcat, f.lastpost_date, f.name, f.lastpost_id, f.lastpost_user, f.lastpost_email, f.lastpost_location, u.id AS uid, u.username FROM forum_topics AS f LEFT JOIN users AS u ON f.lastpost_id = u.id ORDER BY lastpost_date DESC LIMIT ".$db->escape($language_block['Forum config'])."");
else $forum_topics = $db->getTable("SELECT f.id AS fid, f.type, f.cat, f.subcat, f.lastpost_date, f.name, f.lastpost_id, f.lastpost_user, f.lastpost_email, f.lastpost_location, s.id AS sid, s.type, u.id AS uid, u.username FROM forum_topics AS f LEFT JOIN forum_subcat AS s ON (s.id = f.subcat AND s.type != 3) LEFT JOIN users AS u ON f.lastpost_id = u.id WHERE f.subcat = s.id ORDER BY lastpost_date DESC LIMIT ".$db->escape($language_block['Forum config'])."");
//-----------------------------------------------------------------
// Make Foreach
//-----------------------------------------------------------------
$content .= "<tr><td class='con1'>";
<marquee width="100%" valign="center" direction="up" scrolldelay="2" scrollamount="2" onmouseover="this.stop()" onmouseout="this.start()">
<center>
foreach($forum_topics as $idx=>$forum_topic)
{
if($forum_topic['type'] != "3")
{
$content .= "<tr><td class='con1' onMouseOver=this.className='con3' onMouseOut=this.className='con1' onclick=window.location.href='$PHP_SELF?n=modules/forum&a=3&d={$forum_topic['cat']}&o={$forum_topic['subcat']}&q={$forum_topic['fid']}'>";
$content .= "<img src='templates/$template/images/buttons/date.gif' border='0' alt='{$language_block['Forum date']}'> ".today_yesterday($forum_topic['lastpost_date'],true)."";
$content .= "<br>";
$content .= "<a href='$PHP_SELF?n=modules/forum&a=3&d={$forum_topic['cat']}&o={$forum_topic['subcat']}&q={$forum_topic['fid']}'> » ".cuttext($forum_topic['name'],21)."</a><br>{$language_block['Forum by']} ";
if(isset($forum_topic['username'])) $content .= "<a href='$PHP_SELF?n=modules/users&a=1&d={$forum_topic['uid']}'>{$forum_topic['username']}</a>";
else $content .= "<a href='mailto:{$forum_topic['lastpost_email']}'>{$forum_topic['lastpost_user']}</a>";
$content .= " <a href='$PHP_SELF?n=modules/forum&a=6&d={$forum_topic['lastpost_location']}'><img src='templates/$template/images/buttons/last_post.gif' border='0' alt='{$language_block['Forum last']}'></a></td></tr>";
$content .= "</td></tr>";
}
}
}
$template_block = str_replace("{content}", $content, $template_block);
$output = $template_block;
return $output;
}
</center>
</marquee>
</div></td>
</tr>
</table>
|
can you fix this error ...
thank you | | | | | | CounterForce | 31/01/10 - 02:25:10 PM | #2 |
| Senior User
Joined: 19-Nov 09 From: Belgium Posts: 54 | HTML-code must go this way:Here is your code, it should work fine.Code:
<?
/************************************
Jupiter Content System @ Jupiterportal.org
Copyright (C) 2005-2007 Cosmin Flavius (highstrike@gmail.com)
Copyright (C) 2008-2009 George Mark (gmark@jupiterportal.org)
This program is free software; you can redistribute it and/or modify it under the terms of the GNU
General Public License as published by the Free Software Foundation; either version 3 of the License,
or (at your option) any later version.
More Info About The License At http://www.gnu.org/copyleft/gpl.html
*************************************/
function b_forum()
{
$name_function = "b_forum";
global $a, $db, $blocks_db, $template, $language, $config, $misc, $PHP_SELF, $is_loged_in, $is_moderator, $is_administrator, $is_webmaster, $months, $days, $m, $y, $OnlineGuestsCount, $OnlineMembersCount;
if(!file_exists("blocks/$name_function/language/{$config['language']}")) include "blocks/$name_function/language/ar.php";
else include "blocks/$name_function/language/{$config['language']}";
$random_code = md5("$name_function");
$random_code = substr("$random_code", 0, 5);
if(!isset($content)) $content = NULL;
if(!isset($_GET["$random_code"])) $_GET["$random_code"] = NULL;
if($_GET["$random_code"] == "on") $_SESSION["$random_code"] = "on";
elseif($_GET["$random_code"] == "off") $_SESSION["$random_code"] = "off";
$query_string = "?{$_SERVER['QUERY_STRING']}";
foreach($blocks_db as $blocks)
{
$block_code = md5("{$blocks['name']}");
$block_code = substr("$block_code", 0, 5);
$query_string = str_replace("&$block_code=off","", $query_string);
$query_string = str_replace("&$block_code=on","", $query_string);
}
if($query_string == "?" || strpos($query_string, '=on') !== false || strpos($query_string, '=off') !== false) $code_query = "?";
else $code_query = "$query_string&";
if(!isset($_SESSION["$random_code"]) || $_SESSION["$random_code"] == "on") $links = "<a href='$code_query$random_code=off'><img src='templates/$template/images/misc/minus.gif' border='0'> {$language_block['Forum title']}</a>";
elseif($_SESSION["$random_code"] == "off") $links = "<a href='$code_query$random_code=on'><img src='templates/$template/images/misc/plus.gif' border='0'> {$language_block['Forum title']}</a>";
$template_block = implode("", file("templates/$template/block.php"));
$template_block = str_replace("{template}", $template, $template_block);
$template_block = str_replace("{links}", $links, $template_block);
if(!isset($_SESSION["$random_code"]) || $_SESSION["$random_code"] == "on")
{
//-------------------------------
// Get Table + Restrictions
//-------------------------------
if(isset($is_moderator) || isset($is_administrator) || isset($is_webmaster)) $forum_topics = $db->getTable("SELECT f.id AS fid, f.type, f.cat, f.subcat, f.lastpost_date, f.name, f.lastpost_id, f.lastpost_user, f.lastpost_email, f.lastpost_location, u.id AS uid, u.username FROM forum_topics AS f LEFT JOIN users AS u ON f.lastpost_id = u.id ORDER BY lastpost_date DESC LIMIT ".$db->escape($language_block['Forum config'])."");
else $forum_topics = $db->getTable("SELECT f.id AS fid, f.type, f.cat, f.subcat, f.lastpost_date, f.name, f.lastpost_id, f.lastpost_user, f.lastpost_email, f.lastpost_location, s.id AS sid, s.type, u.id AS uid, u.username FROM forum_topics AS f LEFT JOIN forum_subcat AS s ON (s.id = f.subcat AND s.type != 3) LEFT JOIN users AS u ON f.lastpost_id = u.id WHERE f.subcat = s.id ORDER BY lastpost_date DESC LIMIT ".$db->escape($language_block['Forum config'])."");
//------------------------------
// Make Foreach
//------------------------------
$content .= "<tr><td class='con1'>";
$content .= "<marquee width='100%' valign='center' direction='up' scrolldelay='2' onmouseover='this.stop()' onmouseout='this.start()'>";
$content .= "<center>";
foreach($forum_topics as $idx=>$forum_topic)
{
if($forum_topic['type'] != "3")
{
$content .= "<tr><td class='con1' onMouseOver=this.className='con3' onMouseOut=this.className='con1' onclick=window.location.href='$PHP_SELF?n=modules/forum&a=3&d={$forum_topic['cat']}&o={$forum_topic['subcat']}&q={$forum_topic['fid']}'>";
$content .= "<img src='templates/$template/images/buttons/date.gif' border='0' alt='{$language_block['Forum date']}'> ".today_yesterday($forum_topic['lastpost_date'],true)."";
$content .= "<br>";
$content .= "<a href='$PHP_SELF?n=modules/forum&a=3&d={$forum_topic['cat']}&o={$forum_topic['subcat']}&q={$forum_topic['fid']}'> » ".cuttext($forum_topic['name'],21)."</a><br>{$language_block['Forum by']} ";
if(isset($forum_topic['username'])) $content .= "<a href='$PHP_SELF?n=modules/users&a=1&d={$forum_topic['uid']}'>{$forum_topic['username']}</a>";
else $content .= "<a href='mailto:{$forum_topic['lastpost_email']}'>{$forum_topic['lastpost_user']}</a>";
$content .= " <a href='$PHP_SELF?n=modules/forum&a=6&d={$forum_topic['lastpost_location']}'><img src='templates/$template/images/buttons/last_post.gif' border='0' alt='{$language_block['Forum last']}'></a></td></tr>";
$content .= "</td></tr>";
}
}
}
$template_block = str_replace("{content}", $content, $template_block);
$output = $template_block;
return $output;
}
$content .= "</center>";
$content .= "</marquee>";
$content .= "</div></td>";
$content .= "</tr>";
$content .= "</table>";
?>
|
--------------------
 | | | | | | alabkry2007 | 01/02/10 - 04:16:24 AM | #3 |
| Junior User
Joined: 31-Jan 10 From: Burundi Posts: 2 | CounterForce wrote:HTML-code must go this way:Here is your code, it should work fine.Code:
<?
/************************************
Jupiter Content System @ Jupiterportal.org
Copyright (C) 2005-2007 Cosmin Flavius (highstrike@gmail.com)
Copyright (C) 2008-2009 George Mark (gmark@jupiterportal.org)
This program is free software; you can redistribute it and/or modify it under the terms of the GNU
General Public License as published by the Free Software Foundation; either version 3 of the License,
or (at your option) any later version.
More Info About The License At http://www.gnu.org/copyleft/gpl.html
*************************************/
function b_forum()
{
$name_function = "b_forum";
global $a, $db, $blocks_db, $template, $language, $config, $misc, $PHP_SELF, $is_loged_in, $is_moderator, $is_administrator, $is_webmaster, $months, $days, $m, $y, $OnlineGuestsCount, $OnlineMembersCount;
if(!file_exists("blocks/$name_function/language/{$config['language']}")) include "blocks/$name_function/language/ar.php";
else include "blocks/$name_function/language/{$config['language']}";
$random_code = md5("$name_function");
$random_code = substr("$random_code", 0, 5);
if(!isset($content)) $content = NULL;
if(!isset($_GET["$random_code"])) $_GET["$random_code"] = NULL;
if($_GET["$random_code"] == "on") $_SESSION["$random_code"] = "on";
elseif($_GET["$random_code"] == "off") $_SESSION["$random_code"] = "off";
$query_string = "?{$_SERVER['QUERY_STRING']}";
foreach($blocks_db as $blocks)
{
$block_code = md5("{$blocks['name']}");
$block_code = substr("$block_code", 0, 5);
$query_string = str_replace("&$block_code=off","", $query_string);
$query_string = str_replace("&$block_code=on","", $query_string);
}
if($query_string == "?" || strpos($query_string, '=on') !== false || strpos($query_string, '=off') !== false) $code_query = "?";
else $code_query = "$query_string&";
if(!isset($_SESSION["$random_code"]) || $_SESSION["$random_code"] == "on") $links = "<a href='$code_query$random_code=off'><img src='templates/$template/images/misc/minus.gif' border='0'> {$language_block['Forum title']}</a>";
elseif($_SESSION["$random_code"] == "off") $links = "<a href='$code_query$random_code=on'><img src='templates/$template/images/misc/plus.gif' border='0'> {$language_block['Forum title']}</a>";
$template_block = implode("", file("templates/$template/block.php"));
$template_block = str_replace("{template}", $template, $template_block);
$template_block = str_replace("{links}", $links, $template_block);
if(!isset($_SESSION["$random_code"]) || $_SESSION["$random_code"] == "on")
{
//-------------------------------
// Get Table + Restrictions
//-------------------------------
if(isset($is_moderator) || isset($is_administrator) || isset($is_webmaster)) $forum_topics = $db->getTable("SELECT f.id AS fid, f.type, f.cat, f.subcat, f.lastpost_date, f.name, f.lastpost_id, f.lastpost_user, f.lastpost_email, f.lastpost_location, u.id AS uid, u.username FROM forum_topics AS f LEFT JOIN users AS u ON f.lastpost_id = u.id ORDER BY lastpost_date DESC LIMIT ".$db->escape($language_block['Forum config'])."");
else $forum_topics = $db->getTable("SELECT f.id AS fid, f.type, f.cat, f.subcat, f.lastpost_date, f.name, f.lastpost_id, f.lastpost_user, f.lastpost_email, f.lastpost_location, s.id AS sid, s.type, u.id AS uid, u.username FROM forum_topics AS f LEFT JOIN forum_subcat AS s ON (s.id = f.subcat AND s.type != 3) LEFT JOIN users AS u ON f.lastpost_id = u.id WHERE f.subcat = s.id ORDER BY lastpost_date DESC LIMIT ".$db->escape($language_block['Forum config'])."");
//------------------------------
// Make Foreach
//------------------------------
$content .= "<tr><td class='con1'>";
$content .= "<marquee width='100%' valign='center' direction='up' scrolldelay='2' onmouseover='this.stop()' onmouseout='this.start()'>";
$content .= "<center>";
foreach($forum_topics as $idx=>$forum_topic)
{
if($forum_topic['type'] != "3")
{
$content .= "<tr><td class='con1' onMouseOver=this.className='con3' onMouseOut=this.className='con1' onclick=window.location.href='$PHP_SELF?n=modules/forum&a=3&d={$forum_topic['cat']}&o={$forum_topic['subcat']}&q={$forum_topic['fid']}'>";
$content .= "<img src='templates/$template/images/buttons/date.gif' border='0' alt='{$language_block['Forum date']}'> ".today_yesterday($forum_topic['lastpost_date'],true)."";
$content .= "<br>";
$content .= "<a href='$PHP_SELF?n=modules/forum&a=3&d={$forum_topic['cat']}&o={$forum_topic['subcat']}&q={$forum_topic['fid']}'> » ".cuttext($forum_topic['name'],21)."</a><br>{$language_block['Forum by']} ";
if(isset($forum_topic['username'])) $content .= "<a href='$PHP_SELF?n=modules/users&a=1&d={$forum_topic['uid']}'>{$forum_topic['username']}</a>";
else $content .= "<a href='mailto:{$forum_topic['lastpost_email']}'>{$forum_topic['lastpost_user']}</a>";
$content .= " <a href='$PHP_SELF?n=modules/forum&a=6&d={$forum_topic['lastpost_location']}'><img src='templates/$template/images/buttons/last_post.gif' border='0' alt='{$language_block['Forum last']}'></a></td></tr>";
$content .= "</td></tr>";
}
}
}
$template_block = str_replace("{content}", $content, $template_block);
$output = $template_block;
return $output;
}
$content .= "</center>";
$content .= "</marquee>";
$content .= "</div></td>";
$content .= "</tr>";
$content .= "</table>";
?>
|
thank my friend but work and find error on lone 95 and don't ainmated ...
can you fix this .. | | | | | | CounterForce | 04/02/10 - 04:49:12 AM | #4 |
| Senior User
Joined: 19-Nov 09 From: Belgium Posts: 54 | Now this works fine.Code:
<?
/************************************
Jupiter Content System @ Jupiterportal.org
Copyright (C) 2005-2007 Cosmin Flavius (highstrike@gmail.com)
Copyright (C) 2008-2009 George Mark (gmark@jupiterportal.org)
This program is free software; you can redistribute it and/or modify it under the terms of the GNU
General Public License as published by the Free Software Foundation; either version 3 of the License,
or (at your option) any later version.
More Info About The License At http://www.gnu.org/copyleft/gpl.html
*************************************/
function b_forum()
{
$name_function = "b_forum";
global $a, $db, $blocks_db, $template, $language, $config, $misc, $PHP_SELF, $is_loged_in, $is_moderator, $is_administrator, $is_webmaster, $months, $days, $m, $y, $OnlineGuestsCount, $OnlineMembersCount;
if(!file_exists("blocks/$name_function/language/{$config['language']}")) include "blocks/$name_function/language/ar.php";
else include "blocks/$name_function/language/{$config['language']}";
$random_code = md5("$name_function");
$random_code = substr("$random_code", 0, 5);
if(!isset($content)) $content = NULL;
if(!isset($_GET["$random_code"])) $_GET["$random_code"] = NULL;
if($_GET["$random_code"] == "on") $_SESSION["$random_code"] = "on";
elseif($_GET["$random_code"] == "off") $_SESSION["$random_code"] = "off";
$query_string = "?{$_SERVER['QUERY_STRING']}";
foreach($blocks_db as $blocks)
{
$block_code = md5("{$blocks['name']}");
$block_code = substr("$block_code", 0, 5);
$query_string = str_replace("&$block_code=off","", $query_string);
$query_string = str_replace("&$block_code=on","", $query_string);
}
if($query_string == "?" || strpos($query_string, '=on') !== false || strpos($query_string, '=off') !== false) $code_query = "?";
else $code_query = "$query_string&";
if(!isset($_SESSION["$random_code"]) || $_SESSION["$random_code"] == "on") $links = "<a href='$code_query$random_code=off'><img src='templates/$template/images/misc/minus.gif' border='0'> {$language_block['Forum title']}</a>";
elseif($_SESSION["$random_code"] == "off") $links = "<a href='$code_query$random_code=on'><img src='templates/$template/images/misc/plus.gif' border='0'> {$language_block['Forum title']}</a>";
$template_block = implode("", file("templates/$template/block.php"));
$template_block = str_replace("{template}", $template, $template_block);
$template_block = str_replace("{links}", $links, $template_block);
if(!isset($_SESSION["$random_code"]) || $_SESSION["$random_code"] == "on")
{
//-------------------------------
// Get Table + Restrictions
//-------------------------------
if(isset($is_moderator) || isset($is_administrator) || isset($is_webmaster)) $forum_topics = $db->getTable("SELECT f.id AS fid, f.type, f.cat, f.subcat, f.lastpost_date, f.name, f.lastpost_id, f.lastpost_user, f.lastpost_email, f.lastpost_location, u.id AS uid, u.username FROM forum_topics AS f LEFT JOIN users AS u ON f.lastpost_id = u.id ORDER BY lastpost_date DESC LIMIT ".$db->escape($language_block['Forum config'])."");
else $forum_topics = $db->getTable("SELECT f.id AS fid, f.type, f.cat, f.subcat, f.lastpost_date, f.name, f.lastpost_id, f.lastpost_user, f.lastpost_email, f.lastpost_location, s.id AS sid, s.type, u.id AS uid, u.username FROM forum_topics AS f LEFT JOIN forum_subcat AS s ON (s.id = f.subcat AND s.type != 3) LEFT JOIN users AS u ON f.lastpost_id = u.id WHERE f.subcat = s.id ORDER BY lastpost_date DESC LIMIT ".$db->escape($language_block['Forum config'])."");
//------------------------------
// Make Foreach
//------------------------------
$content .= "<tr><td>";
$content .= "<center>";
foreach($forum_topics as $idx=>$forum_topic)
{
if($forum_topic['type'] != "3")
{
$content .= "<tr><td class='con1' onMouseOver=this.className='con3' onMouseOut=this.className='con1' onclick=window.location.href='$PHP_SELF?n=modules/forum&a=3&d={$forum_topic['cat']}&o={$forum_topic['subcat']}&q={$forum_topic['fid']}'>";
$content .= "<marquee width='100%' height='50' valign='center' direction='up' scrolldelay='250' onmouseover='this.stop()' onmouseout='this.start()'>";
$content .= "<img src='templates/$template/images/buttons/date.gif' border='0' alt='{$language_block['Forum date']}'> ".today_yesterday($forum_topic['lastpost_date'],true)."";
$content .= "<br>";
$content .= "<a href='$PHP_SELF?n=modules/forum&a=3&d={$forum_topic['cat']}&o={$forum_topic['subcat']}&q={$forum_topic['fid']}'> » ".cuttext($forum_topic['name'],21)."</a><br>{$language_block['Forum by']} ";
if(isset($forum_topic['username'])) $content .= "<a href='$PHP_SELF?n=modules/users&a=1&d={$forum_topic['uid']}'>{$forum_topic['username']}</a>";
else $content .= "<a href='mailto:{$forum_topic['lastpost_email']}'>{$forum_topic['lastpost_user']}</a>";
$content .= " <a href='$PHP_SELF?n=modules/forum&a=6&d={$forum_topic['lastpost_location']}'><img src='templates/$template/images/buttons/last_post.gif' border='0' alt='{$language_block['Forum last']}'></a></td></tr>";
$content .= "</marquee>";
$content .= "</td></tr>";
}
}
}
$template_block = str_replace("{content}", $content, $template_block);
$output = $template_block;
return $output;
}
$content .= "</center>";
$content .= "</div>";
$content .= "</td></tr>";
?>
|
--------------------
 | | | | |
|
Who's Online |
| No Members Online |
|