Php Fusian, jak poszerzyć tabele News na stronie głownej?


(Karolakdaniel) #1

Witam

Korzystam z Php Fusion 7 i mam skórkę GlossyOrange. Problem jest taki że nie mogę zmienić tabeli środkowejNews aby była szersza, nie wiem za bardzo co w theme za to odpowiada. Wklejam kod thema i proszę o pomoc.

Kod thema:

<?php

if (!defined("IN_FUSION")) { die("Access Denied"); }


define("THEME_BULLET", ""); 

require_once INCLUDES."theme_functions_include.php";

include LOCALE.LOCALESET."downloads.php";


// require_once "menu.php";


/* Theme Settings */


$body_text = "#000000";

$body_bg = "#828282";

$theme_width = "100%";

// $theme_width_l = "200";

// $theme_width_r = "200";


function render_page($license=false) {


global $theme_width,$settings,$locale,$db_prefix,$userdata,$aidlink;


echo "

|

|   | ".showbanners()." | |

|
 
|
".showsublinks("", "white")."

 
|
 
|

|

|   | ".LEFT." | ".U_CENTER.CONTENT.L_CENTER." | ".RIGHT." |   |

|

| |

|

| "; if (iMEMBER) { echo "".$locale['global_035']." |
| "; $msg_count = dbcount("(message_id)", DB_MESSAGES, "message_to='".$userdata['user_id']."' AND message_read='0'AND message_folder='0'"); echo THEME_BULLET." ".$locale['global_120']."\n"; echo THEME_BULLET." ".$locale['global_121']."\n"; echo THEME_BULLET." ".$locale['global_122']."\n"; if (iADMIN && (iUSER_RIGHTS != "" || iUSER_RIGHTS != "C")) { echo THEME_BULLET." ".$locale['global_123']."\n"; } echo THEME_BULLET." ".$locale['global_124']."\n"; if ($msg_count) { echo "
".sprintf($locale['global_125'], $msg_count).($msg_count == 1 ? $locale['global_126'] : $locale['global_127'])."
\n"; } } else { echo "".$locale['global_100']." |
| "; echo "
\n"; echo "\n"; echo $locale['global_101']." \n \n"; echo $locale['global_102']." \n \n"; echo $locale['global_103']." \n"; echo " \n"; echo "\n \n"; if ($settings['enable_registration']) { echo "".$locale['global_105']." \n"; } echo $locale['global_106']."\n
\n"; } echo " |

|

| "; echo "".$locale['400']." |
| "; $result = dbquery("SELECT * FROM ".$db_prefix."downloads ORDER BY download_datestamp DESC LIMIT 0,5"); if (dbrows($result) != 0) { echo "

| | ".$data['download_count']." |
"; } else { echo "".$locale['004']."\n"; } echo "
|

| |

| "; echo "".$locale['global_010']." |
| ";

                                    $result = dbquery("SELECT * FROM ".DB_ONLINE." WHERE online_user=".($userdata['user_level'] != 0 ? "'".$userdata['user_id']."'" : "'0' AND online_ip='".USER_IP."'"));

                                    if (dbrows($result)) {

                                    $result = dbquery("UPDATE ".DB_ONLINE." SET online_lastactive='".time()."' WHERE online_user=".($userdata['user_level'] != 0 ? "'".$userdata['user_id']."'" : "'0' AND online_ip='".USER_IP."'")."");

                                    } else {

                                    $result = dbquery("INSERT INTO ".DB_ONLINE." (online_user, online_ip, online_lastactive) VALUES ('".($userdata['user_level'] != 0 ? $userdata['user_id'] : "0")."', '".USER_IP."', '".time()."')");

                                    }

                                    $result = dbquery("DELETE FROM ".DB_ONLINE." WHERE online_lastactive".(time()-60)."");

                                    $result = dbquery(

                                    "SELECT ton.*, tu.user_id,user_name FROM ".DB_ONLINE." ton

                                    LEFT JOIN ".DB_USERS." tu ON ton.online_user=tu.user_id"

                                    );

                                    $guests = 0; $members = array();

                                    while ($data = dbarray($result)) {

                                    if ($data['online_user'] == "0") {

                                    $guests++;

                                    } else {

                                    array_push($members, array($data['user_id'], $data['user_name']));

                                    }

                                    }

                                    echo "<font size="4px">".$locale['global_011'].": ".$guests."</font>

\n";

                                    echo "".$locale['global_012'].":";

                                    if (count($members)) {

                                    $i = 1;

                                    while (list($key, $member) = each($members)) {

                                    echo " <a href="" rel="external nofollow">".$member[1]."</a>";

                                    if ($i != count($members)) { echo ",\n"; } else { echo "

\n"; }

                                    $i++;

                                    }

                                    }

                                    echo "

\n".$locale['global_014'].": ".number_format(dbcount("(user_id)", DB_USERS, "user_status='1'"))."
\n";

                                    if (iADMIN checkrights("M") $settings['admin_activation'] == "1") {

                                    echo "<a href="" rel="external nofollow">".$locale['global_015']."</a>";

                                    echo dbcount("(user_id)", DB_USERS, "user_status='2'")."

\n";

                                    }

                                    $data = dbarray(dbquery("SELECT user_id,user_name FROM ".DB_USERS." WHERE user_status='0' ORDER BY user_joined DESC LIMIT 0,1"));

                                    echo $locale['global_016'].": <a href="" rel="external nofollow">".$data['user_name']."</a>\n";

                                    echo "</center>"; echo" |

| |

| "; echo "".$locale['global_020']." |
| "; echo "".$locale['global_021']."\n"; $result = dbquery(" SELECT tt.forum_id, tt.thread_id, tt.thread_subject, tt.thread_lastpost FROM ".DB_THREADS." tt INNER JOIN ".DB_FORUMS." tf ON tt.forum_id=tf.forum_id WHERE ".groupaccess('forum_access')." ORDER BY thread_lastpost DESC LIMIT 5 "); if (dbrows($result)) { while($data = dbarray($result)) { $itemsubject = trimlink($data['thread_subject'], 23); echo "· $itemsubject\n"; } } else { echo "
".$locale['global_023']."
\n"; } echo "".$locale['global_022']."\n"; list($min_posts) = dbarraynum(dbquery("SELECT thread_postcount FROM ".DB_THREADS." ORDER BY thread_postcount DESC LIMIT 4,5")); $result = dbquery(" SELECT tf.forum_id, tt.thread_id, tt.thread_subject, tt.thread_postcount FROM ".DB_FORUMS." tf INNER JOIN ".DB_THREADS." tt USING(forum_id) WHERE ".groupaccess('forum_access')." AND tt.thread_postcount = '$min_posts' ORDER BY thread_postcount DESC, thread_lastpost DESC LIMIT 5 "); if (dbrows($result) != 0) { echo "

| · $itemsubject | [".($data['thread_postcount'] - 1)."] |

\n"; } else { echo "
".$locale['global_023']."
\n"; } echo " |

| |

|

|

|

| ".stripslashes($settings['footer'])." |

| Glossy Orange v1.6 theme by Blendtek.net. ".showcopyright()." Glossy Pink theme originally by Fusionate Themes. Converted to PHP-Fusion 7 by Kenneth. | ".showcounter()."".sprintf($locale['global_172'], substr((get_microtime() - START_TIME),0,4))."
|

|"; // echo ""; //Footer end } function render_news($subject, $news, $info) { global $locale; echo "

| $subject |

|

| $news |

| ".newsposter($info,"·").newsopts($info,"·").itemoptions("N",$info['news_id'])." |

|

"; } function render_article($subject, $article, $info) { global $locale; echo "

| $subject |

|

| ".($info['article_breaks'] == "y" ? nl2br($article) : $article)." |

| ".articleposter($info, THEME_BULLET).articleopts($info, THEME_BULLET).itemoptions("A",$info['article_id'])." |

|

"; } function opentable($title) { echo "

| |
| $title |
| \n"; } function closetable() { echo " |

"; } function openside($title, $collapse = false, $state = "on") { global $panel_collapse; $panel_collapse = $collapse; $boxname = str_replace(" ", "", $title); echo "

| | $title | ".panelbutton($state, $boxname)." | |

| | "; if ($collapse == true) { echo panelstate($state, $boxname); } } function closeside() { global $panel_collapse; if ($panel_collapse == true) { echo "\n"; } echo " | |
| | | |
| |
"; } ?[/code]