Forum. MyNuke.ru

Forum. MyNuke.ru (http://forum.mynuke.ru/index.php)
-   Темы оформления phpNuke (http://forum.mynuke.ru/forumdisplay.php?f=12)
-   -   отображение правых блоков. (http://forum.mynuke.ru/showthread.php?t=2415)

B0P0H 28.11.2006 10:51

отображение правых блоков.
 
скачал тему, на скрине выглядела как стандартная широкая, т.е. с левым и правым блоком, а в итоге получил узкую с одним левым :( помогите сделать так что б она начала видеть и правый блок, при возможности объясните как расширить, всем ответившим заранее спасибо.

зы если это поможет - theme.php:
PHP код:
 /**************************************************  **********/ 
/* Theme Colors Definition */
/* */
/* Define colors for your web site. $bgcolor2 is generaly */
/* used for the tables border as you can see on OpenTable() */
/* function, $bgcolor1 is for the table background and the */
/* other two bgcolor variables follows the same criteria. */
/* $texcolor1 and 2 are for tables internal texts */
/**************************************************  **********/
 
global $loonr$prefix$db$kokku;
$kokku $db->sql_numrows($db->sql_query("select * from ".$prefix."_stories LIMIT 0, 30 "));
 
$bgcolor1 "#FFFFFF";
$bgcolor2 "#00BBCC";
$bgcolor3 "#ffffff";
$bgcolor4 "#ffffff";
$textcolor1 "#000000";
$textcolor2 "#000000";
 
if (
$loonr == "") {
$loonr "0";
}
 
include(
"themes/HomeDecor/tables.php");
 
/**************************************************  **********/
/* Function themeheader() */
/* */
/* Control the header for your site. You need to define the */
/* BODY tag and in some part of the code call the blocks */
/* function for left side with: blocks(left); */
/**************************************************  **********/
 
function themeheader() {
global 
$user$banners$sitename$slogan$cookie$prefix$db;
echo 
"<body bgcolor=\"#004080\" text=\"#000000\" link=\"#004080\" vlink=\"#004080\" alink=\"#004080\" leftmargin=\"0\" topmargin=\"0\" marginwidth=\"0\" marginheight=\"0\">";
$public_msg public_message();
$tmpl_file "themes/HomeDecor/header.html";
$thefile implode(""file($tmpl_file));
$thefile addslashes($thefile);
$thefile "\$r_file=\"".$thefile."\";";
eval(
$thefile);
print 
$r_file;
blocks(left);
$tmpl_file "themes/HomeDecor/left_center.html";
$thefile implode(""file($tmpl_file));
$thefile addslashes($thefile);
$thefile "\$r_file=\"".$thefile."\";";
eval(
$thefile);
print 
$r_file;
}
 
/**************************************************  **********/
/* Function themefooter() */
/* */
/* Control the footer for your site. You don't need to */
/* close BODY and HTML tags at the end. In some part call */
/* the function for right blocks with: blocks(right); */
/* Also, $index variable need to be global and is used to */
/* determine if the page your're viewing is the Homepage or */
/* and internal one. */
/**************************************************  **********/
 
function themefooter() {
global 
$index$foot1$foot2$foot3$foot4;
if (
$index == 1) {
$tmpl_file "themes/HomeDecor/center_right.html";
$thefile implode(""file($tmpl_file));
$thefile addslashes($thefile);
$thefile "\$r_file=\"".$thefile."\";";
eval(
$thefile);
print 
$r_file;
blocks(right);
}
$footer_message "$foot1<br>$foot2<br>$foot3<br>$foot4";
$tmpl_file "themes/HomeDecor/footer.html";
$thefile implode(""file($tmpl_file));
$thefile addslashes($thefile);
$thefile "\$r_file=\"".$thefile."\";";
eval(
$thefile);
print 
$r_file;
}
 
/**************************************************  **********/
/* Function themeindex() */
/* */
/* This function format the stories on the Homepage */
/**************************************************  **********/
 
function themeindex ($aid$informant$time$title$counter$topic$thetext$notes$morelink$topicname$topicimage$topictext) {
global 
$anonymous$tipath$cookie$loonr$vasak$parem$kokku$storyhome$storynum;
$ThemeSel get_theme();
if (
file_exists("themes/$ThemeSel/images/topics/$topicimage")) {
$t_image "themes/$ThemeSel/images/topics/$topicimage";
} else {
$t_image "$tipath$topicimage";
}
if (isset(
$cookie[3])) {
$storynum $cookie[3];
} else {
$storynum $storyhome;
}
if (
$notes != "") {
$notes "<br><br><b>"._NOTE."</b> <i>$notes</i>\n";
} else {
$notes "";
}
if (
"$aid== "$informant") {
$content "$thetext$notes\n";
} else {
if(
$informant != "") {
$content "<a href=\"modules.php?name=Your_Account&amp;op=userinfo&amp;username  =$informant\">$informant</a> ";
} else {
$content "$anonymous ";
}
$content .= ""._WRITES." <i>\"$thetext\"</i>$notes\n";
}
$posted ""._POSTEDBY." ";
$posted .= get_author($aid);
$posted .= " "._ON.$time $timezone ($counter "._READS.")";
$tmpl_file "themes/HomeDecor/story_home.html";
$thefile implode(""file($tmpl_file));
$thefile addslashes($thefile);
$thefile "\$r_file=\"".$thefile."\";";
eval(
$thefile);
print 
"$r_file";
}
 
/**************************************************  **********/
/* Function themeindex() */
/* */
/* This function format the stories on the story page, when */
/* you click on that "Read More..." link in the home */
/**************************************************  **********/
 
function themearticle ($aid$informant$datetime$title$thetext$topic$topicname$topicimage$topictext) {
global 
$admin$sid$tipath;
$ThemeSel get_theme();
if (
file_exists("themes/$ThemeSel/images/topics/$topicimage")) {
$t_image "themes/$ThemeSel/images/topics/$topicimage";
} else {
$t_image "$tipath$topicimage";
}
$posted ""._POSTEDON.$datetime "._BY." ";
$posted .= get_author($aid);
if (
$notes != "") {
$notes "<br><br><b>"._NOTE."</b> <i>$notes</i>\n";
} else {
$notes "";
}
if (
"$aid== "$informant") {
$content "$thetext$notes\n";
} else {
if(
$informant != "") {
$content "<a href=\"modules.php?name=Your_Account&amp;op=userinfo&amp;username  =$informant\">$informant</a> ";
} else {
$content "$anonymous ";
}
$content .= ""._WRITES." <i>\"$thetext\"</i>$notes\n";
}
$tmpl_file "themes/HomeDecor/story_page.html";
$thefile implode(""file($tmpl_file));
$thefile addslashes($thefile);
$thefile "\$r_file=\"".$thefile."\";";
eval(
$thefile);
print 
$r_file;
}
 
/**************************************************  **********/
/* Function themesidebox() */
/* */
/* Control look of your blocks. Just simple. */
/**************************************************  **********/
 
function themesidebox($title$content) {
$tmpl_file "themes/HomeDecor/blocks.html";
$thefile implode(""file($tmpl_file));
$thefile addslashes($thefile);
$thefile "\$r_file=\"".$thefile."\";";
eval(
$thefile);
print 
$r_file;


Alexander-V-Sh 28.11.2006 14:45

пользуемся поиском.

P.s. такой большой код прикрепляйте файлом.

B0P0H 28.11.2006 20:04

ну и что поиск? ничего на данную тему на сайте не нашел, может поможешь?

Alie 29.11.2006 00:10

-------------------------------------------------------------------------------------
Найти:
Код:
function themefooter() { global $index, $foot1, $foot2, $foot3, $foot4; if ($index == 1) { $tmpl_file = "themes/HomeDecor/center_right.html"; $thefile = implode("", file($tmpl_file)); $thefile = addslashes($thefile); $thefile = "\$r_file=\"".$thefile."\";"; eval($thefile); print $r_file; blocks(right); }

-------------------------------------------------------------------------------------
Изменить на:
Код:
function themefooter() { global $index, $foot1, $foot2, $foot3, $foot4; if (defined('INDEX_FILE')) { $tmpl_file = "themes/HomeDecor/center_right.html"; $thefile = implode("", file($tmpl_file)); $thefile = addslashes($thefile); $thefile = "\$r_file=\"".$thefile."\";"; eval($thefile); print $r_file; blocks(right); }

-------------------------------------------------------------------------------------
Пробуйте... Напишите результат.
Ждём.
:pirate:

B0P0H 29.11.2006 07:32

преогромнейшая благодарность
 
спасибо большое, заработало. приятно сознавать что есть еще в нашей стране люди не чуждые чужой проблеме... еще раз благодарб от всей души :)

Alie 29.11.2006 17:41

B0P0H: Alexander-V-Sh вам ведь посоветовал поиском пользоватся. А ведь ответ на ваш вопрос только я одна давала уже в темах трёх на этом форуме не считая этой...

raw1 27.02.2008 16:11

Вложений: 1
здравствуйте.
у меня другая проблема:
центральный блок сузился влево. на форуме нигде не нашел такой проблемы.
скрин прикрепляю.

Soniks 29.02.2008 13:53

видимо у вас в коде гдето стоит жестко заданная ширина, если тема на html файлах то смотрите файл left_center.htm последние строки иначе в файле theme.php последние строки в функции themeheader()

raw1 29.02.2008 14:11

Не подскажите в каком файле описывается public_message(); Проблема в нем оказывается.

Soniks 06.03.2008 08:13

mainfile.php

raw1 06.03.2008 10:32

Что то разобраться не могу, подскажите что менять:
Код:
function public_message() { global $prefix, $user_prefix, $db, $user, $admin, $p_msg, $cookie, $broadcast_msg; if ($broadcast_msg == 1) { if (is_user($user)) { cookiedecode($user); $result = $db->sql_query("SELECT broadcast FROM ".$user_prefix."_users WHERE username='$cookie[1]'"); $row = $db->sql_fetchrow($result); $upref = intval($row['broadcast']); if ($upref == 1) { $t_off = "<br><p align=\"right\">[ <a href=\"modules.php?name=Your_Account&amp;op=edithome\">"; $t_off .= "<font size=\"2\">"._TURNOFFMSG."</font></a> ]"; $pm_show = 1; } else { $pm_show = 0; } } else { $t_off = ""; } if (!is_user($user) OR (is_user($user) AND ($pm_show == 1))) { $c_mid = base64_decode($p_msg); $c_mid = addslashes($c_mid); $c_mid = intval($c_mid); $result2 = $db->sql_query("SELECT mid, content, date, who FROM ".$prefix."_public_messages WHERE mid > '$c_mid' ORDER BY date ASC LIMIT 1"); $row2 = $db->sql_fetchrow($result2); $mid = intval($row2['mid']); $content = filter($row2['content'], "nohtml"); $tdate = $row2['date']; $who = filter($row2['who'], "nohtml"); if ((!isset($c_mid)) OR ($c_mid = $mid)) { $public_msg = "<br><table width=\"90%\" border=\"1\" cellspacing=\"2\" cellpadding=\"0\" bgcolor=\"FFFFFF\" align=\"center\"><tr><td>\n"; $public_msg .= "<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"2\" bgcolor=\"FF0000\"><tr><td>\n"; $public_msg .= "<font color=\"FFFFFF\" size=\"3\"><b>"._BROADCASTFROM." <a href=\"modules.php?name=Your_Account&amp;op=userinfo&amp;username =$who\"><font color=\"FFFFFF\" size=\"3\">$who</font></a>: \"$content\"</b>"; $public_msg .= "$t_off"; $public_msg .= "</td></tr></table>"; $public_msg .= "</td></tr></table>"; $ref_date = $tdate+600; $actual_date = time(); if ($actual_date >= $ref_date) { $public_msg = ""; $numrows = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_public_messages")); if ($numrows == 1) { $db->sql_query("DELETE FROM ".$prefix."_public_messages"); $mid = 0; } else { $db->sql_query("DELETE FROM ".$prefix."_public_messages WHERE mid='$mid'"); } } if ($mid == 0 OR empty($mid)) { setcookie("p_msg"); } else { $mid = base64_encode($mid); $mid = addslashes($mid); setcookie("p_msg",$mid,time()+600); } } } } else { $public_msg = ""; } return $public_msg; }

Soniks 13.03.2008 11:18

raw1 в функции все впорядке, если вы ее не трогали, а вот в вашей теме скорее всего имеется не правильный html синтакс

Nikita 04.11.2008 17:32

Цитата то смотрите файл left_center.htm последние строки

у меня в нем находятся только </td><td width="5"></td><td valign="top" width="100%">
че в этом менять то?

Soniks 08.11.2008 23:53

Nikita в этом возможно ничего. Какого рода у вас проблема?

Nikita 09.11.2008 12:43

Soniks центральный блок сузился влево

Soniks 09.11.2008 20:19

Nikita прикрепите файл текстовый с HTML кодом получаемой страницы, где такое наблюдается, посмотрим в чем дело.

z-0091 20.04.2010 15:18

Вложений: 1
столкнулся с подобной проблемой. Предлагаемые варианты решений на форуме не помогули. я отключил левые блоки полностью, но правые не отображаються. Не могу найти где я ошибся при создании темы.. Прикрепляю htmlки темы но без картинок. Буду предзнателен, если мне помогут. По задумке, у меня есть правый блок, а левую часть сайта (вместе с центром) занимает текст.

Soniks 20.04.2010 18:33

В функции themefooter()
нужно заменить
PHP код:
 if ($index == 1) { 

на
PHP код:
 if (defined('HOME_FILE')){ 

z-0091 23.04.2010 16:48

блоки отображаються только на главной странице, как это исправить?

Soniks 23.04.2010 22:01

z-0091 полностью убрать условие:
PHP код:
 if (defined('HOME_FILE')){  
........


Tiamat 15.08.2010 03:22

у меня та-же проблема,правые блоки отображаются только на главной.ничего не помогает.помогите.

Tiamat 15.08.2010 13:50

if (defined('HOME_FILE')){

echo "</td>\n"
// Este es el Hizquierde Derecho | ||
."<td width=\"165\" background=\"themes/XtratoVeil/images/XtratoVeil2_1403.jpg\" valign=\"top\">\n"; // El BG de La HIZ | | |
blocks(right);
}
echo "</td>\n"
."<td width=\"10\" valign=\"top\" background=\"themes/XtratoVeil/images/xtro_05.jpg\"><img src=\"themes/XtratoVeil/images/xtro_05.jpg\" width=\"34\" height=\"10\" border=\"0\"></td>\n"
."</tr>\n"

."</table>\n\n\n";

echo"<TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0>\n";
echo " <TR>\n";
echo " <TD><TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0>\n";
echo " <TR>\n";
echo " <TD width=\"36\" background=\"themes/XtratoVeil/images/xtro_04.jpg\"> <IMG SRC=\"themes/XtratoVeil/images/xtro_04.jpg\" ALT=\"\" WIDTH=36 HEIGHT=10 border=\"0\"></TD>\n";
echo " <TD width=\"100%\"><table border=0 align=\"center\" cellpadding=0 cellspacing=0>\n";

echo " <tr>\n";
echo " <td width=\"36\">\n";

if ($banners)
{
include("banners.php");
}

Soniks 25.08.2010 13:20

PHP код:
 if (defined('HOME_FILE')){ 

тво какраз условие, которое говорит о том что вывод необходим только на главной. Сдледует его убрать, а так же закрывающую скобку условия после blocks(right);


Часовой пояс GMT +4, время: 07:18.

Copyright © 2005 by Soniks