Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Blocks
Author Message
nicotine
New Member
New Member


Joined: Dec 11, 2005
Posts: 4

PostPosted: Sun Feb 12, 2006 9:21 pm Reply with quote

Hello,

What would I need to do to activate a block per a specific module on the left row and at top.
Example:
1) I have a block with html content, the block displays fine and is set with wieght 1, but I have set inactive.
2) I have a module that uses the nuke_blocks table to get its information and output it.
3) The problem: The block does not display in the block row...it displays in the module 'pane', for lack of a better term, at the top left.

So what would you guru's suggest I do? here is the code I used pertaining to the database read and output:
Code:
$row = $db->sql_fetchrow($db->sql_query("select title, content, bposition from ".$prefix."_blocks where blockfile='block-Our_Network.php' $querylang"));

$title = stripslashes(check_html($row['title'], "nohtml"));
$content = stripslashes($row['content']);
$position = $row['bposition'];
$position = substr("$position", 0,1);

  if ($position == "l"){
      themesidebox($title, $content);

}
It displays fine, just not in the right place Sad

TIA,
nicotine

::Edit: Crap! wrong forum Sad
 
View user's profile Send private message
montego
Site Admin


Joined: Aug 29, 2004
Posts: 9453
Location: Arizona

PostPosted: Mon Feb 13, 2006 7:08 am Reply with quote

nicotine, the showing of blocks is completely controlled outside of your module code. From your module code, you will only be able to influence whether the right-hand blocks show or not (its ALL or nothing). You have no control of what blocks show vs. not from your module code.

_________________
Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
nicotine
PostPosted: Tue Feb 14, 2006 12:52 am Reply with quote

montego wrote:
nicotine, the showing of blocks is completely controlled outside of your module code. From your module code, you will only be able to influence whether the right-hand blocks show or not (its ALL or nothing). You have no control of what blocks show vs. not from your module code.

Ok, well from you advice I decided to call the block file from my theme.php and it works like a charm Smile
I am sure there may be a better way but I am still learning the proper way to do things.
Code:
$row = $db->sql_fetchrow($db->sql_query("select title, content, bposition from ".$prefix."_blocks where blockfile='block-Our_Network.php' $querylang"));

    $title = stripslashes(check_html($row['title'], "nohtml"));
    $content = stripslashes($row['content']);
    $position = $row['bposition'];
    $position = substr("$position", 0,1);

and
Code:
--snip--

    if ($name == 'Forums' || $name=='MS_Analysis' || $name == 'CPanel_User_Guide' || $name == 'Shopping_Cart' || $name == 'News' || $name == 'Image_Hosting') {
    } else if ($name == 'About_Us'){themesidebox($title, $content) & blocks(left);
    } else {
    blocks(left);
    }
--snip--

again thanks for the advice montego, once again a big help Cheers
 
montego
PostPosted: Tue Feb 14, 2006 6:28 am Reply with quote

nicotine, glad you found a place to put this. I always hate modifying code nuke files to get things done, but, if that is your only choice...
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Blocks

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©