Probleme mit Rechtenblock in ein Theme

Begonnen von seleck, 20 August 2004, 09:50:13

⏪ vorheriges - nächstes ⏩

0 Mitglieder und 2 Gäste betrachten dieses Thema.

seleck

Halloechen,

ich hab ein problem mit unten aufgeführten Theme. Das Theme funktioniert soweit gut aber sobald ich NEWS-Module anklicke und diese mehr als eine Seite hat wird der Rechte-Block ausgeblendet. Die Letzte Seite wird wieder mit komplet mit Rechten-Block gezeigt, obwohl in Admin-Konfiguration festgelegt ist, dass Recteblöcke sollen immer gezeigt werden.

Hab nach meinem Wissen in code des Themes alles probiert aber komme nicht weiter. Ich möchte das Rechteblöcke immer eingeschaltet sind.
wäre für jede Hilfe dankbar.
Hier ist Theme.php von diesem Theme. hab Kommentare an entsprechenden Stellen hinzugefügt:
  <?php
function mytheme_getinfo()
{
$ret = array();
$ret['my_theme_name'] = "Testing123"; // Name of the theme
$ret['my_lbox_onoff'] = "1"; // 1 for show 0 for hiding left blocks
$ret['my_rbox_onoff'] = "1"; // 1 for show 0 for hiding left blocks
$ret['my_height'] = "0"; //height of storypage
return $ret;
}

$bgcolor1   = "#ADBABD";
$bgcolor2   = "#ADBABD";
$bgcolor3   = "#8C9A9C";
$bgcolor4   = "#8C9A9C";
$textcolor1 = "#FFFFFF";
$textcolor2 = "#000000";

$themeinfo   = mytheme_getinfo();            
$theme_name = $themeinfo['my_theme_name'];
include("themes/$theme_name/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  $admin, $user, $banners, $sitename, $slogan, $cookie, $prefix, $db, $dbi, $nukeurl, $anonymous, $name;

 if ($banners == 1) {
    $numrows = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_banner WHERE type='0' AND active='1'"));
    if ($numrows>1) {
    $numrows = $numrows-1;
    mt_srand((double)microtime()*1000000);
    $bannum = mt_rand(0, $numrows);
    } else {
    $bannum = 0;
    }
    $sql = "SELECT bid, imageurl, clickurl, alttext FROM ".$prefix."_banner WHERE type='0' AND active='1' LIMIT $bannum,1";
    $result = $db->sql_query($sql);
    $row = $db->sql_fetchrow($result);
    $bid = $row[bid];
    $imageurl = $row[imageurl];
    $clickurl = $row[clickurl];
    $alttext = $row[alttext];
   
    if (!is_admin($admin)) {
    $db->sql_query("UPDATE ".$prefix."_banner SET impmade=impmade+1 WHERE bid='$bid'");
    }
    if($numrows>0) {
    $sql2 = "SELECT cid, imptotal, impmade, clicks, date FROM ".$prefix."_banner WHERE bid='$bid'";
    $result2 = $db->sql_query($sql2);
    $row2 = $db->sql_fetchrow($result2);
    $cid = $row2[cid];
    $imptotal = $row2[imptotal];
    $impmade = $row2[impmade];
    $clicks = $row2[clicks];
    $date = $row2[date];

    if (($imptotal <= $impmade) AND ($imptotal != 0)) {
       $db->sql_query("UPDATE ".$prefix."_banner SET active='0' WHERE bid='$bid'");
       $sql3 = "SELECT name, contact, email FROM ".$prefix."_bannerclient WHERE cid='$cid'";
       $result3 = $db->sql_query($sql3);
       $row3 = $db->sql_fetchrow($result3);
       $c_name = $row3[name];
       $c_contact = $row3[contact];
       $c_email = $row3[email];
       if ($c_email != "") {
       $from = "$sitename <$adminmail>";
       $to = "$c_contact <$c_email>";
       $message = ""._HELLO." $c_contact:\n\n";
       $message .= ""._THISISAUTOMATED."\n\n";
       $message .= ""._THERESULTS."\n\n";
       $message .= ""._TOTALIMPRESSIONS." $imptotal\n";
       $message .= ""._CLICKSRECEIVED." $clicks\n";
       $message .= ""._IMAGEURL." $imageurl\n";
       $message .= ""._CLICKURL." $clickurl\n";
       $message .= ""._ALTERNATETEXT." $alttext\n\n";
       $message .= ""._HOPEYOULIKED."\n\n";
       $message .= ""._THANKSUPPORT."\n\n";
       $message .= "- $sitename "._TEAM."\n";
       $message .= "$nukeurl";
       $subject = "$sitename: "._BANNERSFINNISHED."";
       mail($to, $subject, $message, "From: $from\nX-Mailer: PHP/" . phpversion());
       }
       }
       $showbanners = "<a href=\"banners.php?op=click&bid=$bid\" target=\"_blank\"><img src=\"$imageurl\" border=\"0\" alt='$alttext' title='$alttext'></a>";
       }
    }

    cookiedecode($user);
    $username = $cookie[1];
    if ($username == "") {$username = "Anonymous";}
   
    if ($username == "Anonymous") {$theuser = " <a href=\"modules.php?name=Your_Account&op=new_user\">Create an account";
    } else {$theuser = "  Welcome $username!";}
    $public_msg  = public_message();
    $themeinfo   = mytheme_getinfo();
    $theme_name  = $themeinfo['my_theme_name'];
    $rbox_show   = $themeinfo['my_rbox_onoff'];
    $lbox_show   = $themeinfo['my_lbox_onoff'];
    $tmpl_file   = "themes/$theme_name/header.html";
    $thefile     = implode("", file($tmpl_file));
    $thefile     = addslashes($thefile);
    $thefile     = "\$r_file=\"".$thefile."\";";
    eval($thefile);
    print $r_file;

    $tmpl_file = "themes/$theme_name/left_outside.html";
    $thefile = implode("", file($tmpl_file));
    $thefile = addslashes($thefile);
    $thefile = "\$r_file=\"".$thefile."\";";
    eval($thefile);
    print $r_file;

    //LEFT SIDE BACKGROUND
    $rbox_show     = $themeinfo['my_rbox_onoff'];
    if ($name=="Gallery"){}
    else
    if ($name=="Forums"){}
    else
    if ($name=="catalog"){}
    else {
    global $swapleftorright;
    $swapleftorright = "1";

    if  ($lbox_show==1)
    {
    blocks(left);
    if ($rbox_show<>1) {blocks(right);}
    }
    $swapleftorright = "0";
    }
    $tmpl_file = "themes/$theme_name/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, $copyright, $totaltime, $footer_message;
        $themeinfo     = mytheme_getinfo();
        $theme_name    = $themeinfo['my_theme_name'];
        $lbox_show     = $themeinfo['my_lbox_onoff'];
       
        $tmpl_file = "themes/$theme_name/center_right.html";
        $thefile = implode("", file($tmpl_file));
        $thefile = addslashes($thefile);
        $thefile = "\$r_file=\"".$thefile."\";";
        eval($thefile);
        print $r_file;

    if ($index == 1) {
$themeinfo = mytheme_getinfo();
        $rbox_show = $themeinfo['my_rbox_onoff'];
        if  ($rbox_show==1)
        {
        blocks(right);
        if ($lbox_show<>1) {blocks(left);
        }
        }
        }
        $tmpl_file = "themes/$theme_name/right_outside.html";
        $thefile = implode("", file($tmpl_file));
        $thefile = addslashes($thefile);
        $thefile = "\$r_file=\"".$thefile."\";";
        eval($thefile);
        print $r_file;


      $themeinfo  = mytheme_getinfo();
    $theme_name = $themeinfo['my_theme_name'];
    $rbox_show  = $themeinfo['my_rbox_onoff'];
    $lbox_show  = $themeinfo['my_lbox_onoff'];
    $tmpl_file  = "themes/$theme_name/footer.html";
    $thefile    = implode("", file($tmpl_file));
    $thefile    = addslashes($thefile);
    $thefile    = "\$r_file=\"".$thefile."\";";
    eval($thefile);
    print $r_file;
    echo "<center>";
 
  $footer_message = footmsg();
    echo "</center>\n";
}

/************************************************************/
/* 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,$timezone,$posted,$posted1, $tipath;

    $ThemeSel = get_theme();
    if (file_exists("themes/$ThemeSel/images/topics/$topicimage")) {
    $t_image = "themes/$ThemeSel/images/topics/$topicimage";
    } else {
    $t_image = "$tipath$topicimage";
    }

    if ($notes != "") {
    $notes = "<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&op=userinfo&username=$informant\">$informant</a> ";
    } else {
    $content = "$anonymous ";
    }
    $content .= ""._WRITES." <i>\"$thetext\"</i>$notes\n";
    }
    $posted1 .= get_author($aid);
    $posted .= " $time $timezone ($counter "._READS.")";
    $themeinfo    = mytheme_getinfo();
    $theme_name   = $themeinfo['my_theme_name'];
    $space_height = $themeinfo['my_height'];
    $tmpl_file    = "themes/$theme_name/story_home.html";
    $thefile      = implode("", file($tmpl_file));
    $thefile      = addslashes($thefile);
    $thefile      = "\$r_file=\"".$thefile."\";";
    eval($thefile);
    print $r_file;
}

/************************************************************/
/* Function themearticle()                                  */
/*                                                          */
/* 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,$notes, $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 = "<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&op=userinfo&username=$informant\">$informant</a> ";
    } else {
    $content = "$anonymous ";
    }
    $content .= ""._WRITES." <i>\"$thetext\"</i>$notes\n";
    }
    $themeinfo   = mytheme_getinfo();
    $theme_name = $themeinfo['my_theme_name'];
    $tmpl_file = "themes/$theme_name/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.                */
/************************************************************/
    $index=1;
    function themesidebox($title, $content) {
    global $swapleftorright, $bgcolor1, $bgcolor2;
    $themeinfo   = mytheme_getinfo();
    $theme_name = $themeinfo['my_theme_name'];
    if ($swapleftorright=="0") { //setting this to "1" will swap left and right block appearance
    $tmpl_file    = "themes/$theme_name/block_r.html";
    } else {
    $tmpl_file    = "themes/$theme_name/block_l.html";
    }
    $thefile = implode("", file($tmpl_file));
    $thefile = addslashes($thefile);
    $thefile = "\$r_file=\"".$thefile."\";";
    eval($thefile);
    print $r_file;
}

?>

[Editiert am 20/8/2004 von seleck]
If I advance, follow me.
If I stop, push me.
If I fall, inspire me.

Ria

Hi,
Du solltest schon mal in die Suche gehen.

In jedem Modul findest Du oben sowas = "  if ($index == 1"
und da änderst Du mal auf 0  oder umgekehrt probier mal aus.

Oder nimmst die Generaleinstellung im Adminmenü!

Gruss Ria

seleck

Danke für die Antwort Ria. Aber das ist ja nicht. In Adminmenü steht ja auch so drin.

Es zeigt ja auch normal beide Linke und Rechte Blöcke. Nur warum wird beim NEWS-Module der Rechte-Block abgeschlatet wird, verstehe ich nicht. ich hoffe irgendein Admin wenn die Zeit es erlaubt, mir antworten kann.  :o

[Editiert am 20/8/2004 von seleck]
If I advance, follow me.
If I stop, push me.
If I fall, inspire me.

Ria

Hi seleck,
gehe trotzdem mal in die index.php von dem Modul.

Steht da $index = 1

dann sind die rechten Blöcke zu sehen, steht da 0, dann nicht!

Gruss Ria


seleck

Danke Rita nochmals, leider hat das immer noch nicht geholfen, aber dieses Thread wird auch hier weiter verfolgt:  :)

http://www.pragmamx.org/modules.php?name=eBoard&file=viewthread&tid=10880#pid65209
If I advance, follow me.
If I stop, push me.
If I fall, inspire me.