Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Converting/Creating General Discussion
Author Message
wHiTeHaT
Life Cycles Becoming CPU Cycles



Joined: Jul 18, 2004
Posts: 579

PostPosted: Sun Aug 09, 2009 5:01 am Reply with quote

I need to find a way to show an inactive block without activate it inside the database.
Does anyone ever came acros this , ifso, could he/she point me in the good direction.

Grtzz wHiTeHaT


Last edited by wHiTeHaT on Mon Aug 10, 2009 7:40 am; edited 3 times in total 
View user's profile Send private message Send e-mail
jakec
Site Admin



Joined: Feb 06, 2006
Posts: 3048
Location: United Kingdom

PostPosted: Sun Aug 09, 2009 6:28 am Reply with quote

Show it to who, everyone?
 
View user's profile Send private message
wHiTeHaT







PostPosted: Sun Aug 09, 2009 6:34 am Reply with quote

No not to everyone , however if visitor X is on page Y(not per module) , show block.
 
wHiTeHaT







PostPosted: Sun Aug 09, 2009 6:37 am Reply with quote

i'm also planning to override/rename/call again excisting functions within the mainfile to manipulate theme functions.
 
jakec







PostPosted: Sun Aug 09, 2009 6:38 am Reply with quote

What will define which visitor can see it? IP?

..or will it be a member?
 
wHiTeHaT







PostPosted: Sun Aug 09, 2009 6:39 am Reply with quote

it could be defined by anything , that is something i decide and not the default methode.
for that i could create a new or overwrite an excisting funtion.
 
jakec







PostPosted: Sun Aug 09, 2009 6:42 am Reply with quote

I was going to suggest groups and assign that block a group. May be create a function to add that user to a group based on your conditions.
 
wHiTeHaT







PostPosted: Sun Aug 09, 2009 6:44 am Reply with quote

no the group use is out of the question , i considered that but that would mean i use a default build in methode.
I want to make it indepandent.
 
jakec







PostPosted: Sun Aug 09, 2009 6:48 am Reply with quote

OK, well it sounds like you need to design your own group type function as well.
 
wHiTeHaT







PostPosted: Sun Aug 09, 2009 6:50 am Reply with quote

in theory this should be done where the block query is called and where theres a check for active 0 or 1.
so if i'm correct i could do an elseif to say if(defined('SHOW_BLOCK')) { $active ==1;}
I havent tested it this way yet , couse i also plan to override this function ( i dont now yet where it is called) , and create a new one for it.
 
wHiTeHaT







PostPosted: Sun Aug 09, 2009 6:53 am Reply with quote

i'm giving me my own answer again Smile

So as i solved my 1st problem (theoratical) , i need to see how i can override a function from the mainfile.php
 
wHiTeHaT







PostPosted: Sun Aug 09, 2009 12:27 pm Reply with quote

After some investigations abouth override function , i come to conclusion this wouldnt be the correct solution.
Reason is that it requires APD (ZEND debugger) , and would not be appropriate to let function a script on that.
So this brings me back to the start.

I also investigated the function , function blocks($side) , but i didnt figured it out yet how to set a block active when it is not active in the db.

I really would be pleased to get this issue fixed , couse i made a greath progress with a verry special script, i would like to share with the nuke community.
for anyone who knows who i am can figure out what i did Wink
Grtzz wHiTeHaT
 
jakec







PostPosted: Sun Aug 09, 2009 12:33 pm Reply with quote

I would look at the group script. From what you have said you only want a script to display depending on the user. The group script allows you to do this.

I think what you need to do is have the block active, but only display it if it meets your criteria.
 
wHiTeHaT







PostPosted: Sun Aug 09, 2009 12:35 pm Reply with quote

you mis understand me it isnt user based, atleast not nuke user based , it is a per page based.

you should think like the WB blocksmanager addon but then have options to show blocks per page aswell.
FYI: that isnt the script i work on.
 
wHiTeHaT







PostPosted: Sun Aug 09, 2009 12:38 pm Reply with quote

i also would like to add this code for it to the custom_mainfile.php so i dont need to edit the default mainfile.php.
Else the script wouldnt be a module anymore , in my opinion.
A theme edit is also no option.
 
jakec







PostPosted: Sun Aug 09, 2009 12:42 pm Reply with quote

OK I think I understand.

I would still suggest that the block is set to active and then display the block depending on the criteria you set.

I understand autotheme lite does this, but on a per module basis.
 
wHiTeHaT







PostPosted: Sun Aug 09, 2009 12:51 pm Reply with quote

yes i think i have to do a little research , to see if it is posseble to make an extra $view and render_blocks() scenario in the custom_mainfile.php
The autotheme wouldnt be an option either , even if it did a show block per page.
The whole script have to work on it's own , beside this issue , it already works 100%.
it also doesnt have anything to do with theming.
Sorry i wont tell yet what it is, you still could figure it out.
but there ar some reasons i cant tell yet , but i really would like to , it is verry hard for me to not shout it of the rooftop yet.
 
wHiTeHaT







PostPosted: Sun Aug 09, 2009 12:56 pm Reply with quote

I still would like to see an example of someone who did simular already.
i hoped to find something on karakas but i couldnt find.
 
wHiTeHaT







PostPosted: Sun Aug 09, 2009 4:59 pm Reply with quote

***[BOGUS CODE REMOVED]***


Last edited by wHiTeHaT on Mon Aug 10, 2009 7:42 am; edited 1 time in total 
wHiTeHaT







PostPosted: Sun Aug 09, 2009 8:12 pm Reply with quote

It seem i was to greedy , it only works if have 1 block setup
 
wHiTeHaT







PostPosted: Mon Aug 10, 2009 7:39 am Reply with quote

Forget all the above and see:
[suggestion](old) methode of an empty block

With that you can make any statement to show a blocks content or not,without to make group ,anomynous,visitor or admin assignments, when this isnt needed for you.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Converting/Creating General Discussion

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 ©