4images Forum & Community
Welcome, Guest. Please login or register.
Did you miss your activation email?
February 22, 2018, 09:53:52 AM

Login with username, password and session length
Search:     Advanced search
Follow 4images on twitter: Click here to follow!
Togle to toolbar
Translate this page with =>
Translate this page >
* Home Help Search Login Register
 
+  4images Forum & Community
|-+  4images Modifications / Modifikationen
| |-+  Mods & Plugins (Releases & Support)
| | |-+  Tutorials (Moderators: mawenzi, Rembrandt)
| | | |-+  [TUT] Add a url-variable like {url_yourlink}
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Print
This topic has not yet been rated!
Author Topic: [TUT] Add a url-variable like {url_yourlink}  (Read 7672 times)
senloel
Full Member
***
Offline Offline

Posts: 196

Thank You
-Given: 0
-Receive: 8


View Profile
« on: September 16, 2013, 06:52:38 PM »

Hey,

as you maybe know, you can add different types of variables in your template files.
One type are the url-Variables.

If you want to add a link to different sites, it's useful to write a variable instead of the whole link.
It's much easier to edit this link, if something has changed. You only have to change the link in one file instead in every template file where you added the link.

This MOD will show you how to add this Variable.

Step 1  Arrow Open the template files where you want to add a link.

Step 2  Arrow Add the following anywhere to show the link:

1
<a href="{url_yourlink}">Yourlink-text</a>

Step 3.1  Arrow Open includes/page_header.php and search:

1
  "url_new_images" => $site_sess->url(ROOT_PATH."search.php?search_new_images=1"),

add below:

1
  "url_yourlink" => $site_sess->url(ROOT_PATH."yourlink-url"),

  Step 3.2  Arrow How to add the link url:
If you want to link to a file which is in your 4images directory:

Use
1
  "url_yourlink" => $site_sess->url(ROOT_PATH."yourlink-url"),

for example:

1
  "url_yourlink" => $site_sess->url(ROOT_PATH."search.php"),

or with subfolders:

1
  "url_yourlink" => $site_sess->url(ROOT_PATH."admin/index.php"),


That was it already Wink

Regards,
Patrick
Logged
Rembrandt
Moderator
4images Guru
*****
Offline Offline

Posts: 4187

Thank You
-Given: 116
-Receive: 896

Vienna


View Profile WWW
« Reply #1 on: September 16, 2013, 07:19:32 PM »

Thank You!  Good

mfg Andi
Logged

Meine 4Images Modifikationen  Now over 100 Modification Online!    Meine 4images Demo Seite


Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.082 seconds with 21 queries.
Post your comments here