Author |
Message |
wHiTeHaT
Life Cycles Becoming CPU Cycles

Joined: Jul 18, 2004
Posts: 579
|
Posted:
Sun Aug 09, 2009 5:01 am |
|
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 |
|
|
 |
jakec
Site Admin

Joined: Feb 06, 2006
Posts: 3048
Location: United Kingdom
|
Posted:
Sun Aug 09, 2009 6:28 am |
|
Show it to who, everyone? |
|
|
|
 |
wHiTeHaT

|
Posted:
Sun Aug 09, 2009 6:34 am |
|
No not to everyone , however if visitor X is on page Y(not per module) , show block. |
|
|
|
 |
wHiTeHaT

|
Posted:
Sun Aug 09, 2009 6:37 am |
|
i'm also planning to override/rename/call again excisting functions within the mainfile to manipulate theme functions. |
|
|
|
 |
jakec

|
Posted:
Sun Aug 09, 2009 6:38 am |
|
What will define which visitor can see it? IP?
..or will it be a member? |
|
|
|
 |
wHiTeHaT

|
Posted:
Sun Aug 09, 2009 6:39 am |
|
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

|
Posted:
Sun Aug 09, 2009 6:42 am |
|
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

|
Posted:
Sun Aug 09, 2009 6:44 am |
|
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

|
Posted:
Sun Aug 09, 2009 6:48 am |
|
OK, well it sounds like you need to design your own group type function as well. |
|
|
|
 |
wHiTeHaT

|
Posted:
Sun Aug 09, 2009 6:50 am |
|
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

|
Posted:
Sun Aug 09, 2009 6:53 am |
|
i'm giving me my own answer again
So as i solved my 1st problem (theoratical) , i need to see how i can override a function from the mainfile.php |
|
|
|
 |
wHiTeHaT

|
Posted:
Sun Aug 09, 2009 12:27 pm |
|
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
Grtzz wHiTeHaT |
|
|
|
 |
jakec

|
Posted:
Sun Aug 09, 2009 12:33 pm |
|
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

|
Posted:
Sun Aug 09, 2009 12:35 pm |
|
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

|
Posted:
Sun Aug 09, 2009 12:38 pm |
|
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

|
Posted:
Sun Aug 09, 2009 12:42 pm |
|
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

|
Posted:
Sun Aug 09, 2009 12:51 pm |
|
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

|
Posted:
Sun Aug 09, 2009 12:56 pm |
|
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

|
Posted:
Sun Aug 09, 2009 4:59 pm |
|
***[BOGUS CODE REMOVED]*** |
Last edited by wHiTeHaT on Mon Aug 10, 2009 7:42 am; edited 1 time in total |
|
|
 |
wHiTeHaT

|
Posted:
Sun Aug 09, 2009 8:12 pm |
|
It seem i was to greedy , it only works if have 1 block setup |
|
|
|
 |
wHiTeHaT

|
Posted:
Mon Aug 10, 2009 7:39 am |
|
Forget all the above and see:
Only registered users can see links on this board! Get registered or login!
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. |
|
|
|
 |
|