PHP Web Host - Quality Web Hosting For All PHP Applications Just Great Software
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
vaudevillian
Worker
Worker


Joined: Jan 18, 2008
Posts: 135

PostPosted: Sat Apr 05, 2008 10:39 am Reply with quote Back to top

Im trying to figure out how to add the themes to the blocks inside the nsn center blocks.

Code that is nsn center block:

Code:

<?php

/********************************************************/
/* NSN Center Blocks for PHP-Nuke                       */
/* By: NukeScripts Network (webmaster@nukescripts.net)  */
/* http://www.nukescripts.net                           */
/* Copyright © 2000-2003 by NukeScripts Network         */
/********************************************************/
/* Original by: Richard Benfield                        */
/* http://www.benfield.ws                               */
/********************************************************/

if (eregi("cblocks.php", $_SERVER['PHP_SELF'])) {
    Header("Location: index.php");
    die();
}
global $bgcolor1, $bgcolor2, $bgcolor3, $bgcolor4, $textcolor1, $textcolor2, $prefix, $db;
list($cb_enabled, $cb_height, $cb_count) = $db->sql_fetchrow($db->sql_query("select cb_enabled, cb_height, cb_count from ".$prefix."_c4blocks_config where cfgid='1'"));
if ($cb_enabled=='1') {
    if ($cb_height <> "") {
        $cblockheight = "height=\"$cb_height\" ";
    } else {
        $cblockheight = "";
    }
    echo "<table width=\"100%\" ".$cblockheight."border=\"0\" cellspacing=\"1\" cellpadding=\"0\" bgcolor=\"$bgcolor2\"><tr><td valign=\"top\">\n";
    echo "<table width=\"100%\" ".$cblockheight."border=\"0\" cellspacing=\"1\" cellpadding=\"1\" bgcolor=\"$bgcolor1\"><tr><td valign=\"top\">\n";
    echo "<font class=\"content\"><tr>";
    $result3 = $db->sql_query("select cbid, name, title, wtype, width from ".$prefix."_c4blocks_list order by cbid asc");
    while(list($cbid, $cblockname, $cblocktitle, $wtype, $width) = $db->sql_fetchrow($result3)) {
        if ($cbid > $cb_count) {
        } else {
            if ($wtype == '0') {
                echo "<td width=\"".$width."\" valign=\"top\" align=\"center\">\n";
            } else {
                echo "<td width=\"".$width."%\" valign=\"top\" align=\"center\">\n";
            }
            $content = "";
            include("blocks/".$cblockname."");
            themecenterbox($cblocktitle,$content);
        }
    }
    echo "</td></tr></font>\n";
    echo "</td></tr></table>\n";
    echo "</td></tr></table>\n";
    echo "<br>";
}

?>

I have tried to add a image to the tables but it is only comming up in the center block not the blocks themselfs. Any help would be greatly appreciated.
View user's profile Send private message Send e-mail
jestrella
Worker
Worker


Joined: Dec 01, 2005
Posts: 145
Location: Santiago, Dom. Rep.

PostPosted: Sat Apr 05, 2008 6:44 pm Reply with quote Back to top

You must edit file /includes/nsncb_func.php
and make the desired changes there...

and if you can explain a bit more what changes you try to do would be better.
View user's profile Send private message Visit poster's website
vaudevillian
Worker
Worker


Joined: Jan 18, 2008
Posts: 135

PostPosted: Sat Apr 05, 2008 9:43 pm Reply with quote Back to top

I think what happened is I downloaded an older version of center blocks. There is no file nsncb_func.php

The file I downloaded is nsn center 4 blocks
I just got nsn_center_blocks_71-77_220

I will try this tomorrow. Thank you for your help. Sometimes even some little insite as to a file name helps out greatly.
View user's profile Send private message Send e-mail
jestrella
Worker
Worker


Joined: Dec 01, 2005
Posts: 145
Location: Santiago, Dom. Rep.

PostPosted: Sat Apr 05, 2008 10:08 pm Reply with quote Back to top

if i am not wrong that is the latest available version of NSN center blocks.

The point is that those are kind of special blocks. Every block is rendered using a main function withing the nsncb_func.php file. this file is NOT located in the BLOCKS folder but within the INCLUDES folder in your nuke root folder.

That said if you already edited the needed files and what you are now trying to do is to add content to the center blocks, this is easily done through the admin system of your site. You should just activate the desired blocks and then start playing with them just as you do with normal blocks (add html code or select a file from the dropdown).
View user's profile Send private message Visit poster's website
vaudevillian
Worker
Worker


Joined: Jan 18, 2008
Posts: 135

PostPosted: Sun Apr 06, 2008 9:44 am Reply with quote Back to top

I did not have nsncb_func.php file in my install file for nsn blocks
View user's profile Send private message Send e-mail
vaudevillian
Worker
Worker


Joined: Jan 18, 2008
Posts: 135

PostPosted: Sun Apr 06, 2008 11:26 am Reply with quote Back to top

I got the updated one installed. Works a little better as well.

What im trying to do is make those 4 center blocks inside the main box take on the theme.
Only registered users can see links on this board!
Get registered or login to the forums!


you will see the 4 center blocks without the blocks theme.

So im trying to get those blocks to use the defualt theme that a user may choose.
View user's profile Send private message Send e-mail
jestrella
Worker
Worker


Joined: Dec 01, 2005
Posts: 145
Location: Santiago, Dom. Rep.

PostPosted: Sun Apr 06, 2008 12:03 pm Reply with quote Back to top

Ok, now I'm getting it

It is because center blocks use the OpenTable/CloseTable functions and not the blocks() function.

Shame on PHP-Nuke base code.
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic

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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2008 by Raven
Proud to be listed at Lobo Links Web Directory

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::

:: fisubice Theme Recoded To 100% W3C CSS & HTML 4.01 Transitional Compliance by Raven and 64bitguy ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum