Welcome to Geeklog, Anonymous Thursday, April 25 2024 @ 06:02 am EDT

Geeklog Forums

Blocks Not Showing


thatcanadianguy

Anonymous
I have a problem with the Who's Online, New Members... etc. blocks not showing up on the right. I've checked through my config file and (as someone suggested here) post a story in all the topics. Didn't work :/ Any suggestions? http://techneaux.mine.nu:82/~egamers/ Thanks.
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Hmm, hard to tell from here. Things that come to mind: - Make sure those blocks are actually activated - Make sure permissions are set correctly on the blocks - Does it happen with other themes as well? Maybe you accidentally removed the {right_blocks} variable from the theme. Hope that helps ... bye, Dirk
 Quote

thatcanadianguy

Anonymous
hmm... I switched it to XSilver and it works. I'll check the gameserver theme. I modified the horizontal bar, so maybe I did delete it :/ Thanks for your help!<br>BUT...<br><br>I have a custom block which I want to put an image in. The image won't display, though. Here's the code:<br><br><code><center><a href="http://techneaux.mine.nu:82/"><img scr="http://techneaux.mine.nu:82/~mystojay/logo/techneaux2.gif" height="47" width="100" border="0" alt="Visit My Host!"></a><br><a href="http://techneaux.mine.nu:82/"><b>http://techneaux.mine.nu:82</b></a></center></code><br><br>I have it as a normal block. I've tripple checked the URL and I'm positive that it's right.---ooh, a signature. ive always wanted one of these.
 Quote

Anonymous

Anonymous
I have a similar problem except the right blocks are not showing in the article.php page ONLY - They work fine everywhere else and it seems they are replaced with story specific blocks "Whats related" and "Story Options" - I have no need for the "Whats related" and "Story Options" blocks and frankly dont know how to get the others to show on the story page - The article.php... HELP?!?!?
 Quote

Status: offline

rawdata

Forum User
Full Member
Registered: 02/17/03
Posts: 236
Go inside article.php. Scroll down to the bottom of the page. Find this line of code: $display .= COM_siteFooter(); Replace it with this: $display .= COM_siteFooter(true); That will turn the right blocks on when viewing the whole article. If you don't want the what's related stuff, be sure to delete {whats_related_story_options} and its associated column in the /article/article.thtmtl template file
 Quote

Status: offline

lenz

Forum User
Newbie
Registered: 02/20/03
Posts: 7
That did it, but I now have 2 rightblock columns - I cannot find the part of the code to edit to make it display the What's Related and Story Options in the same column as the normal right block... Thanks for the help - i do appreciate it.
 Quote

Status: offline

lenz

Forum User
Newbie
Registered: 02/20/03
Posts: 7
And if you dont know what I mean by 2 colums - check this out - http://www.bigfatloser.com/article.php?story=20020101120556538
 Quote

Status: offline

vbgunz

Forum User
Full Member
Registered: 01/24/03
Posts: 169
I do not know what you did but thats kind of cool... Maybe it isn't what you want but like an untamed animal it'll be nice to put a leash of control on that... nice error though Smile ---Victor B. Gonzalez
Victor B. Gonzalez -
http://aeonserv.com
 Quote

Status: offline

rawdata

Forum User
Full Member
Registered: 02/17/03
Posts: 236
Wait a minute...are you the same guy?? I thought the question was how to get rid of those completely. The reason you have two right columns is because you didn't delete {whats_related_story_options} and its associated column in the /article/article.thtmtl template file. If do this, that column will disappear leaving the right blocks.
 Quote

Status: offline

rawdata

Forum User
Full Member
Registered: 02/17/03
Posts: 236
Okay, here ya go. Once you get rid of the extra right column in the article.thtml template. If you want to move the what's related stuff over to the right column with the rest of the blocks, then try this. This block should only appear when someone accesses the entire article to read.

Add the function below to your lib-custom.php file. Then create a regular right block using the control panel.

Block Title: Enter "What's Related"
Enabled: Check this block
Help File URL: Leave blank
Block Name: Enter "whatsrelated"
Topic: Select "All" or a specific topic you want it to appear on
Side: Choose which side of the page you want the block to appear on (left or right)
Block Order: Set the order in which you want it to appear
Block Type: Select "PHP Block"
PHP Block Options: Enter "phpblock_whatsrelated"
Portal Block Options: Leave this blank
Normal Block Options: Leave this blank
Access Rights: Set the Group to "Block Admin" or whatever you want
Permissions: Set read and edit privileges as you like.
Text Formatted Code


function phpblock_whatsrelated()
{
    global $_TABLES, $LANG11, $story, $story_options;

    // initialize variables
    $related = '';
    $optionsblock = '';
    $display = '';

    // process only if the entire article is viewed
    if (eregi("article.php",$_SERVER['PHP_SELF']) AND isset($story) AND is_numeric($story)) {

        // pull the story info from the database and check the visitor's permissions
        $result = DB_query("SELECT * FROM {$_TABLES['stories']} WHERE sid = '$story'");
        $A = DB_fetchArray($result);
        if (SEC_hasAccess($A['owner_id'],$A['group_id'],$A['perm_owner'],
$A['perm_group'],$A['perm_members'],$A['perm_anon']) AND (SEC_hasTopicAccess($A['tid']))) {

            $related = $A['related'];

            // if related is not empty then display it
            if (!empty($related)) {
                $related = $A['related'] . '<br />';
            }

            // display email and print if Admin has set these options
            if (count($story_options) > 0) {
                $optionsblock = COM_startBlock ($LANG11[4], '',
                    COM_getBlockTemplate ('story_options_block', 'header'))
                    . COM_makeList ($story_options)
                    . COM_endBlock(COM_getBlockTemplate('story_options_block','footer'));
            }
            else {
                $optionsblock = '';
            }
        }
        $display = $related . $optionsblock;
    }
    return $display;

} // end function phpblock_whatsrelated
 
 Quote

Status: offline

lenz

Forum User
Newbie
Registered: 02/20/03
Posts: 7
http://www.bigfatloser.com/article.php?story=20020101120556538 You are my HERO - This almost has it and it is an example of how to format an options block for PHP - Problem is I suck at php and I am a geeklog greenhorn - Anyways - IT ALMOST WORKS. I have been harshin though the code to see what might be causing the problem - Have a look at the link and make suggestions please...Thanks!!!
 Quote

Status: offline

rawdata

Forum User
Full Member
Registered: 02/17/03
Posts: 236
Sorry...it looked okay in my theme putting it in one box but is definitely whacked out in yours. I'll fix it later this evening.
 Quote

Anonymous

Anonymous
No problem - I REALLY Appreciate the help - I do my GeekLoggin g in the xsilver theme...
 Quote

Anonymous

Anonymous
No love? Hey RawData - I have not heard if you had any luck with figuring this out...
 Quote

Status: offline

lenz

Forum User
Newbie
Registered: 02/20/03
Posts: 7
That was me - I keep forgetting to log in...
 Quote

All times are EDT. The time is now 06:02 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content