vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   GET variables in my template (or how to change oder status) (https://vborg.vbsupport.ru/showthread.php?t=225497)

ganima 10-18-2009 02:44 PM

GET variables in my template (or how to change oder status)
 
Hi there.
I am using an addon to sort profilefields on /memberlist.php.
Addon: https://vborg.vbsupport.ru/showthrea...=124580&page=2

Unfortunately it does have only the ability to sort one way ? ASC or DESC. But I want it to change every click, like other fields (User, Last Post etc.).

In my template I tried
Code:

<if condition="$get['order'] == 'ASC'">
                <td class="thead" nowrap="nowrap"><a href="$sorturl&amp;order=DESC&amp;sort=mitgliednummer&amp;pp=$perpage$usergrouplink">Mitglied-Nr</a> $sortarrow[mitgliednummer]</td>
        <else />
                <td class="thead" nowrap="nowrap"><a href="$sorturl&amp;order=ASC&amp;sort=mitgliednummer&amp;pp=$perpage$usergrouplink">Mitglied-Nr</a> $sortarrow[mitgliednummer]</td>
        </if>

It seems I can not access GET variables in my template?! How can I?

Does anybody have an idea how I can change ASC to DESC and reverse?

Hope for some help. Thanks!!

Lynne 10-18-2009 02:55 PM

Do a google search on "get post request variables" and you'll see the correct syntax to use for them. In fact, here you go - PHP: Predefined Variables - Manual

ganima 10-18-2009 05:08 PM

It's a little bit mortifying. :o
I do know how to write the correct code but I thought PHP is not allowed in templates. I should have tested it :)


Thanks anyway for your help, Lynne!

Lynne 10-18-2009 05:33 PM

php is not allowed in templates. But, a simple comparison condition is allowed in templates.


All times are GMT. The time now is 07:00 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01002 seconds
  • Memory Usage 1,713KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete