html/tpl |
Author: |
Message: |
Quantum
Disabled Account
Away.
Posts: 1055 Reputation: -17
31 / /
Joined: Feb 2007
|
O.P. html/tpl
Well if you look at this code:
<input size="40" id="video_link" name="video_link" type="text" value='/videos.php?id={$video[video].id}'>
You see the /videos.php?id={$video[video].id}
is it possible to put a code infront of it so it adds the website url to it?
I can't seem to understand.
Thanks.
|
|
05-21-2008 04:45 PM |
|
|
Menthix
forum admin
Posts: 5537 Reputation: 102
40 / /
Joined: Mar 2002
|
RE: html/tpl
Sure, but not recommended, makes your site less flexible.
But you can put your site URL in a variable, pass it to the template. code: $smarty->assign ("url", http://www.example.com");
And call it. code: <input size="40" id="video_link" name="video_link" type="text" value='{url}/videos.php?id={$video[video].id}'>
|
|
05-21-2008 06:14 PM |
|
|
Quantum
Disabled Account
Away.
Posts: 1055 Reputation: -17
31 / /
Joined: Feb 2007
|
O.P. RE: html/tpl
quote: Originally posted by MenthiX
Sure, but not recommended, makes your site less flexible.
But you can put your site URL in a variable, pass it to the template.
codesmarty->assign ("url", http://www.example.com");
I mean so what ever URL the site viewed it is that's what will be added. Is that your code?
This post was edited on 05-21-2008 at 06:18 PM by Quantum.
|
|
05-21-2008 06:17 PM |
|
|
Menthix
forum admin
Posts: 5537 Reputation: 102
40 / /
Joined: Mar 2002
|
RE: html/tpl
In that case just don't change anything.
Just using /videos.php?id={$video[video].id} will already point users to "example.com/videos.php?id={$video[video].id}" or "somethingelse.example.com/videos.php?id={$video[video].id}" depending on which url your users use to access you site. In most cases there is no reason to prefix the domain in the code.
Maybe i'm not understanding your question?
|
|
05-21-2008 06:32 PM |
|
|
Quantum
Disabled Account
Away.
Posts: 1055 Reputation: -17
31 / /
Joined: Feb 2007
|
O.P. RE: html/tpl
I know that will still work but that code output's a URL to a webpage so it can be /videos.php... it will have to be http://example.com/videos.php?...
Understand?
Thanks!
|
|
05-21-2008 06:49 PM |
|
|
Thor
Veteran Member
Awwwwwwww.
Posts: 1118 Reputation: 42
32 / – /
Joined: May 2006
|
RE: html/tpl
quote: Originally posted by john-t
I know that will still work but that code output's a URL to a webpage so it can be /videos.php... it will have to be http://example.com/videos.php?...
Understand?
Thanks!
That's exactly what it would be, unless you wish to redirect the user to a diffrent place. In such an event, MenthiX just told you.
|
|
05-21-2008 08:11 PM |
|
|
Quantum
Disabled Account
Away.
Posts: 1055 Reputation: -17
31 / /
Joined: Feb 2007
|
O.P. RE: html/tpl
but i need it to work no matter were its at so i don't have to edit the code and chnage the url..
|
|
05-21-2008 08:30 PM |
|
|
Menthix
forum admin
Posts: 5537 Reputation: 102
40 / /
Joined: Mar 2002
|
RE: html/tpl
Judging by what you pasted it will/should work no matter where it's at without changing any code. If it doesn't, link us to the page where the problem is so we can see what you mean.
|
|
05-21-2008 10:15 PM |
|
|
Quantum
Disabled Account
Away.
Posts: 1055 Reputation: -17
31 / /
Joined: Feb 2007
|
O.P. RE: html/tpl
$smarty->assign ("url", http://www.example.com");
Will that code no output http://www.example.com instead of my URL?
|
|
05-21-2008 10:20 PM |
|
|
Lou
Veteran Member
Posts: 2475 Reputation: 43
– / /
Joined: Aug 2004
|
RE: html/tpl
quote: Originally posted by john-t
$smarty->assign ("url", http://www.example.com");
Will that code no output http://www.example.com instead of my URL?
Change it to your url?
The future holds bright things in it\\\'s path, but only time will tell what they are and where they come from.
Messenger Stuff Forums
|
|
05-21-2008 11:17 PM |
|
|
Pages: (2):
« First
[ 1 ]
2
»
Last »
|
|