Page 1 of 1
How should links be written i user defined tags?
Posted: Thu Sep 24, 2009 1:28 pm
by Terabyte
Ok, I have this problem, that I don't get. This is how I tried to write the links in user defined tags and it gives me a blank output on the page:
Code: Select all
echo '<a href=\''.$lankurl.'\'>'.$lankurl.'</a>';
Any idea?

Re: How should links be written i user defined tags?
Posted: Thu Sep 24, 2009 3:42 pm
by Jeff
Terabyte wrote:
echo ''.$lankurl.'';
First check you variable should it be $linkurl?
Also when I display something in php I use ' for the quote and use " to be passed on to the browser that way you don't have to escape any char.
Code: Select all
echo '<a href='''.$lankurl.'">'.$lankurl.'</a>';
Re: How should links be written i user defined tags?
Posted: Thu Sep 24, 2009 3:55 pm
by Terabyte
Thank you.
The variable is just fine.
" doesn't work at all, and that's why I use \' ....
Re: How should links be written i user defined tags?
Posted: Thu Sep 24, 2009 3:59 pm
by Terabyte
This works:
Code: Select all
echo '<a href=" ">'.$lankurl.'</a>';
This don't work and give blank output:
Code: Select all
echo '<a href="test">'.$lankurl.'</a>';
I really have no clue what is going on. All my installations have this problem. I run many other scripts on the server and have no problems.
Re: How should links be written i user defined tags?
Posted: Thu Sep 24, 2009 4:05 pm
by Jeff
Not sure what is going on. Might be something else in the UDT that is causing the problem.
Re: How should links be written i user defined tags?
Posted: Thu Sep 24, 2009 4:06 pm
by calguy1000
This is not a CMSMS issue, it's a general programming issue... better asked on a different board.
Re: How should links be written i user defined tags?
Posted: Thu Sep 24, 2009 4:17 pm
by Terabyte
calguy1000 wrote:
This is not a CMSMS issue, it's a general programming issue... better asked on a different board.
What do you mean? The code is correct, but the user defined tags gives a blank screen. It sure is a CMS issue I think, but I just can't find the bug.
What obvious programming issues do you see here?
This works:
This don't work and give blank output:
Code: Select all
echo '<a href="test">TestTestTestTest</a>';
Re: How should links be written i user defined tags?
Posted: Thu Sep 24, 2009 4:22 pm
by Terabyte
ajprog wrote:
Not sure what is going on. Might be something else in the UDT that is causing the problem.
Well, I have had this problem since 1.4 I think, but been too lazy to look into that. Last time I gave up after couple of days ... this time I don't know what to do anymore. I'm in a way dependent on this function.
Re: How should links be written i user defined tags?
Posted: Thu Sep 24, 2009 4:24 pm
by Terabyte
OK, guys. Thank you anyway for your time. I will port those couple sites to another cms, since I lost enough time on this. All other sites, without this function, works great on cmsms and can as they are.
Thread can be closed.
Re: How should links be written i user defined tags?
Posted: Thu Sep 24, 2009 4:33 pm
by Jeff
ajprog wrote:
Not sure what is going on. Might be something else in the UDT that is causing the problem.
Is the only line in your UDT this ONE line?
Also if you think this is a CMSms product issue, then why have you provide any product info as directed to for support questions?
http://forum.cmsmadesimple.org/index.ph ... 661.0.html
You can replace whatever you want but we will nolonger support it.
Re: How should links be written i user defined tags?
Posted: Thu Sep 24, 2009 4:41 pm
by Terabyte
Well sorry for that. I use the latest version. Basically no other plugins or so. No there is more code in the UDT, but all code has ben checked.
As I said thanks anyway for taking your time, but I give up. Since I'm the only one having this problem, so I will no longer take your time.
Re: How should links be written i user defined tags?
Posted: Thu Sep 24, 2009 4:53 pm
by Jeff
No there is more code in the UDT, but all code has ben checked.
The other code is the only thing left. Something VERY little might be causing it.
Re: How should links be written i user defined tags?
Posted: Thu Sep 24, 2009 8:20 pm
by Jos
Do you have tags in your UDT perhaps? They shouldn't be used at the beginning and ending of a UDT. Just a wild guess
