You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 36 guest(s) and 2 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - How to create html table structures in a NUKE BLOCK? [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
aashish
Nuke Cadet
Nuke Cadet


Joined: Feb 16, 2007
Posts: 2


PostPosted: Fri Feb 16, 2007 4:08 am Reply with quoteBack to top

Hello!

I tried creating table structure for my block using

$content .='<table width=\"100%\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">';


It is not picking up.. Any idea why? I want nested tables but i am unable to do so. Please guide.

Can a block have more than one table? If so how do i do that?

Any help appreciated! Thanks a ton!!!!

Rolling Eyes
Find all posts by aashishView user's profileSend private message
arnoldkrg
Major
Major


Joined: Aug 03, 2003
Posts: 937

Location: United Kingdom

PostPosted: Fri Feb 16, 2007 5:53 am Reply with quoteBack to top

You need to write your own block. Heres an example using nested tables:
Code:
<?php
if (eregi("block-Tables.php",$_SERVER['PHP_SELF'])) {
    Header("Location: index.php");
}

$content = "";

$stuff = <<< End_Stuff

<table>
   <tr>
      <td align="center">This is some text in a table cell</td>
   </tr>
   <tr>
      <td>First cell</td><td> Second cell/td>
   </tr>
   <tr>
      <td colspan="2"><table>
         <tr>
            <td>First cell</td><td> Second cell</td>
         </tr>
      </table></td>
   </tr>   
</table>


End_Stuff;

$content .= $stuff;
?>


Save the above as block-Tables.php and upload to the blocks directory of your site. WARNING!!!! The copy/paste process may add invisible blank characters to the ends of codelines. These MUST be removed before uploading the file. I use Crimson Editor to find and remove these blank characters.

Next go to admin.php....blocks and create your Block by scrolling down and giving it a title. Next select Tables from the dropdown Filename select box and click create.

Explanation

See how I have slotted straight forward html between:
Code:
$stuff = <<< End_Stuff


and:
Code:
End_Stuff;


This is a heredoc and can be used to add straightforward HTML or Javascript to any block.

You can create similar blocks using the same method. Change:
Code:
if (eregi("block-Tables.php",$_SERVER['PHP_SELF'])) {
    Header("Location: index.php");
}


to:
Code:
if (eregi("block-Anotherblock.php",$_SERVER['PHP_SELF'])) {
    Header("Location: index.php");
}


and you can save as block-Anotherblock.php, and now you have a second block

_________________
Image
Find all posts by arnoldkrgView user's profileSend private messageSend e-mailVisit poster's website
aashish
Nuke Cadet
Nuke Cadet


Joined: Feb 16, 2007
Posts: 2


PostPosted: Sat Feb 17, 2007 5:04 am Reply with quoteBack to top

That worked well!

Really appreciate your skill set!

Also if I have to turn off a left navigation and right navigation for a particular module say "downloads".. how is it done?

Thanks again!!!
Find all posts by aashishView user's profileSend private message
arnoldkrg
Major
Major


Joined: Aug 03, 2003
Posts: 937

Location: United Kingdom

PostPosted: Sat Feb 17, 2007 7:43 am Reply with quoteBack to top

In modules/Downloads/index.php find:
Code:
define('INDEX_FILE', true);


and comment out that line thus:
Code:
//define('INDEX_FILE', true);


That will get rid of the right blocks for the Downloads module.

In themes/yourtheme/theme.php find the themeheader function:

In that function find the globals line. Something like:
Code:
 global $banners, $sitename;


and add into that line $name thus:
Code:
 global $banners, $sitename, $name;


Next in same function find:
Code:
blocks("left");


and change to:
Code:
   if($name != "Downloads")
   {
    blocks("left");
   }


That will disable left blocks too for the Downloads module. If you want to get rid of left blocks for other modules, just add them as below:
Code:
   if($name != "Downloads" && $name != "Feedback")
   {
    blocks("left");
   }


That will disable left blocks for both the Downloads and Feedback modules

_________________
Image
Find all posts by arnoldkrgView user's profileSend private messageSend e-mailVisit poster's website
Display posts from previous:      
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next 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



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by · TOGETHER TEAM srl ITALY http://www.togetherteam.it · DONDELEO E-COMMERCE http://www.DonDeLeo.com
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.214 Seconds - 462 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::