PDA

View Full Version : grabbing do=action from php script?


c0bra
Fri 19th Oct '07, 10:55am
Is it possible to run an <if> statement to detect if a blog.php?do=VARIABLE is within a vBulletin template?

i.e.
we have the URL http://www.vbulletin.com/forum/blog.php?do=gohome

In the vbulletin template:
<if condition="!$gohome">
<else />
build header
</if>

I want to build a couple headers for pages in the blogs to fit with a design.
But with the way the templates are used and constructed I need to detect only two pages - so as not to affect the other sections of the blog where these same templates are called.

Freddie Bingham
Fri 19th Oct '07, 11:57am
<if condition="$_REQUEST['do'] == 'gohome'">

c0bra
Fri 19th Oct '07, 1:23pm
Thanks for the tip.

I've assigned this:
<if condition="$_REQUEST['do'] == 'list'">
<!-- code ---!>
</if>

To template:
blog_list_entries

But if I go here:
http://<blogurl.com>/blog.php?u=20075

It's still pulling the code within the <if></if> statement above. Any ideas why?

Freddie Bingham
Fri 19th Oct '07, 1:36pm
I don't know, that is the proper check. You can verify it by just placing $_REQUEST[do] in the template and then see what is displayed when you view the page.

Also, the blog_list_entries template is only called by the do == list action so why would you need to check for that action within the blog_list_entries template?