Webmastersite.net
Register Log In

Need help with {VARNAME}
Need help with {VARNAME}

Comments on Need help with {VARNAME}

nf708181f1
Member

Usergroup: Customer
Joined: Aug 23, 2005

Total Topics: 13
Total Comments: 29
Posted Aug 23, 2005 - 12:28 PM:

When inserting {VARNAME} into a template, or when inserting a php parameter name (i.e. search) into a template, text substitution does not occur. Instead, "{VARNAME} or "{search}" is displayed. My objective is to display the description for a hyperlink selected by the user from the preceding page.
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Aug 23, 2005 - 9:30 PM:

I would have to know why you expect {VARNAME} to mean something.

My objective is to display the description for a hyperlink selected by the user from the preceding page.

Can you restate that somehow?
nf708181f1
Member

Usergroup: Customer
Joined: Aug 23, 2005

Total Topics: 13
Total Comments: 29
Posted Aug 24, 2005 - 9:50 AM:

{VARNAME}, according to the excerpt below from the manual, provides access to any variable attached to a URL.

To restate the issue, let's assume my WSNLinks directory has the following hyperlink:

<a href="search.php?filled=1&whichtype=links&condition=and&search=Photograph&userparm=Photography">
Photography</a><br>

It would be helpful if {VARNAME} returned the parameter (i.e. filled=1&whichtype=links&condition=and&search=Photograph&userparm=Photography), or if {userparm} returned "Photography." Then, "Photography" can be displayed in search.php.

Based on my attempt, this approach does not work. So, what approach can be used to pass and display text selected by the user from one page to another?


==============================================

Global Variables
By Paul

{AREA} - The title of the current section of the directory.
{TID} - The name of the template being used on the current page.
{CURRENTURL} - The full URL of the page being viewed.
{CATOPTIONS} - Gives the options data for a dropdown menu of categories, for use within a selector.
{TEMPLATEOPTIONS} - Gives the options data for a dropdown menu of template sets for use in a selector.
{TOTALLINKS} - Total number of links in the directory.
{TOTALCATEGORIES} - Total number of categories in the directory.
{TOTALHITS} - Total hits out from the directory.
{TOTALHITSIN} - Total hits in to the directory.
{LASTUPDATE} - Date on which directory was last updated.
{UNVALIDATEDITEMS} - The number of items pending validation.
{HITSTEMPDATE} - The date when the temporary hits was last reset.

- When any debug level is on, place this where you want the total execution time listed. If you don't use it, the info will just be appended to the bottom of your page.

If the online users feature is activated, you may also use the global online variables listed here.

{THISMEMBER - You can use all member variables globally as applying to the person currently viewing, by using {THISMEMBER instead of {MEMBER but otherwise using member template variables as normal.

You can display the total number of items of any type globally by using this syntax: {TOTAL + type name + LINKS/CATEGORIES/COMMENTS + }
As an example, to show the number of links of type 'regular' you would use {TOTALREGULARLINKS}

All language can also be used anywhere with a template variable of the form {LANG_NAME}, where NAME is the upcase version of the name of that language. For example, {LANG_TITLE_VOTE}.

All settings work globally by using {SETTINGNAME}.

Any variable which is attached to a URL (x.php?var1=x&var2=y) can be accessed using {VARNAME}... any variable submitted by a form or contained in a cookie is available the same way.
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Aug 24, 2005 - 11:58 AM:

{USERPARAM} does give the value, if supplied in the url, just as the manual says.

A {VARNAME}, of course, means nothing unless you've passed &varname=x in the url.
nf708181f1
Member

Usergroup: Customer
Joined: Aug 23, 2005

Total Topics: 13
Total Comments: 29
Posted Aug 24, 2005 - 3:28 PM:

{VARNAME} is still not working in my application. The call is:

www.menumagnet.com/wsnlinks...=Accidents&search=accident

Search.php has in its first few lines:
<div class="nav"><a href="https://www.webmastersite.net/forums/">{LANG_NAVORIGIN}</a> > {NUMRESULTS} Links
For < {uservarname} ></div><br>

When search.php displays its page, "{uservarname}" is shown instead of "Accident."


Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Aug 26, 2005 - 2:34 PM:

Obviously, because you're doing that in lowercase.
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



This thread is closed, so you cannot post a reply.