Author |
Message |
jimmyjimjim
Lieutenant
Joined: Jan 23, 2003
Posts: 258
Location: USA
|
Posted:
Fri Jul 11, 2003 4:13 pm |
|
Hi,
I wan't to strip the theme block from the banner block only. When I use the below code this happens...
in the if()
== results in all blocks looking normal
!= results in all block themes going away and just showing the block content.
Uhg... The nuke_blocks $bid for the advertising block is 16, so this should work... Right??? (I wan't to say thanks to Paladin for getting me started on this trek, but he's busy with his new site right now so I'm bring this question to NC).
Code: |
if ($bid == 16) {
echo "<table width=\"165\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td>\n";
echo "$content\n";
echo "</td></tr></table>\n\n";
} else {
_THEME BLOCK STRUCTURE ($title & $content)_ |
Any ideas? |
|
|
|
|
disgruntledtech
Site Admin
Joined: Apr 14, 2003
Posts: 991
Location: Tulsa, OK
|
Posted:
Fri Jul 11, 2003 10:59 pm |
|
is $bid in the global statement for that function
example
|
|
|
|
|
chris-au
Elite Nuker
Joined: Jan 31, 2003
Posts: 717
|
Posted:
Fri Jul 11, 2003 11:52 pm |
|
Is that the block-Advertising.php?
If so, there is no function in that file. |
_________________ Chris
|
|
|
|
disgruntledtech
Site Admin
Joined: Apr 14, 2003
Posts: 991
Location: Tulsa, OK
|
Posted:
Sat Jul 12, 2003 12:51 am |
|
chris-au wrote: |
Is that the block-Advertising.php?
If so, there is no function in that file. |
thats not a block's code its the block theme function themesideblock() |
|
|
|
|
jimmyjimjim
Lieutenant
Joined: Jan 23, 2003
Posts: 258
Location: USA
|
Posted:
Sat Jul 12, 2003 6:15 am |
|
yes... $bid is in the global...
The way my themesideblock() is setup is:
Code: |
themesideblock($title, $content) {
global $bid;
if ($bid == 16) {
do the modified block
} else {
do the standard block configuratoin
}
} |
This should work... shouldn't it? I mean its kinda working and not returning any errors and I'm accessing the nuke_blocks table for the correct $bid. |
|
|
|
|
chris-au
Elite Nuker
Joined: Jan 31, 2003
Posts: 717
|
Posted:
Sat Jul 12, 2003 1:26 pm |
|
Thanks for the info.
I do not think that you should try to change that there.
You should have a look at mainfile.php.
Experiment with the function render_blocks( etc etc.
That is wher the $bid is firstly being accessed. |
_________________ Chris
|
|
|
|
jimmyjimjim
Lieutenant
Joined: Jan 23, 2003
Posts: 258
Location: USA
|
Posted:
Sat Jul 12, 2003 5:46 pm |
|
ok... I'm in the mainfile and I'm reviewing the render_blocks function. But I'm lost... How can I tell I tell my theme to choose a block_theme layout based on $bid from here?
! come on... throw a dog a bone... |
|
|
|
|
chris-au
Elite Nuker
Joined: Jan 31, 2003
Posts: 717
|
Posted:
Sat Jul 12, 2003 6:29 pm |
|
I read your post but I really don't know what EXACTLY you want to do.
I know at times I am a bit dense in understanding what the real quetion is (see my previous post here).
In admin/blocks there are many things one can do with blocks but I suppose that is not the question.
If I know what you want to do, I ceratinly will try to get an answer for you,
I like challenges. |
_________________ Chris
|
|
|
|
jimmyjimjim
Lieutenant
Joined: Jan 23, 2003
Posts: 258
Location: USA
|
Posted:
Sat Jul 12, 2003 7:19 pm |
|
The result I am trying to achieve is this...
I would like to display the banners block ($bid 16) $content only wrapped in a <table><tr><td> with nothing around the displayed banner...
WHile maintaining the themes blocks structure for the rest of my site.
I just want to remove the block from around the banner so that the banner, and only the banner is displayed on the page with no block around it.
|
|
|
|
|
chris-au
Elite Nuker
Joined: Jan 31, 2003
Posts: 717
|
Posted:
Sat Jul 12, 2003 7:47 pm |
|
Can I see your site with that banner block somewhere? |
_________________ Chris
|
|
|
|
jimmyjimjim
Lieutenant
Joined: Jan 23, 2003
Posts: 258
Location: USA
|
Posted:
Sun Jul 13, 2003 6:25 am |
|
This is where I am...
I created this...
Code: |
ALTER TABLE nuke_blocks ADD `blockplace` CHAR(50) NOT NULL AFTER `blockfile`; |
Now... in my theme I want to do this...
Code: |
if ($blockplace == 1) {
do a modified block theme
} else {
do the default block theme |
Now the questoin is where do I put this?
Code: |
$sql = "SELECT blockplace FROM ".$prefix."_blocks";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$blockplace = $row[blockplace]; |
|
|
|
|
|
jimmyjimjim
Lieutenant
Joined: Jan 23, 2003
Posts: 258
Location: USA
|
Posted:
Sun Jul 13, 2003 10:01 am |
|
Ok.. THis is driving me NUTS! I updated function blocks($side) (in mainfile.php) to call $blockplace.
And now I'm back to the beggining...
If $blockplace == 1 then nothing changes...
If I say $blockplace !=1 then everything changes... So I know its working, but...
All all of the blocks executed at the same time? Why can't I convert just one? |
|
|
|
|
chris-au
Elite Nuker
Joined: Jan 31, 2003
Posts: 717
|
Posted:
Sun Jul 13, 2003 1:01 pm |
|
I think you want to display a certain block in a certain way.
Still quite don't understand what.
But, if you download Blocks_Mod.zip from from here you can manipulate blocks in relation to with a theme if you wish. |
_________________ Chris
Last edited by chris-au on Sun Jul 13, 2003 4:05 pm; edited 1 time in total |
|
|
|
jimmyjimjim
Lieutenant
Joined: Jan 23, 2003
Posts: 258
Location: USA
|
Posted:
Sun Jul 13, 2003 3:45 pm |
|
I'm sorry but I couldn't find the file you were pointing me to... COUld you possibly provide a direct link?
THanks in advance... |
|
|
|
|
disgruntledtech
Site Admin
Joined: Apr 14, 2003
Posts: 991
Location: Tulsa, OK
|
Posted:
Sun Jul 13, 2003 3:51 pm |
|
|
|
|
|