How should links be written i user defined tags?

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
Terabyte
Forum Members
Forum Members
Posts: 79
Joined: Fri Aug 18, 2006 8:57 am

How should links be written i user defined tags?

Post 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?  ???
Jeff
Power Poster
Power Poster
Posts: 961
Joined: Mon Jan 21, 2008 5:51 pm

Re: How should links be written i user defined tags?

Post 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>';
Terabyte
Forum Members
Forum Members
Posts: 79
Joined: Fri Aug 18, 2006 8:57 am

Re: How should links be written i user defined tags?

Post by Terabyte »

Thank you.
The variable is just fine.
" doesn't work at all, and that's why I use \'  ....
Terabyte
Forum Members
Forum Members
Posts: 79
Joined: Fri Aug 18, 2006 8:57 am

Re: How should links be written i user defined tags?

Post 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.
Jeff
Power Poster
Power Poster
Posts: 961
Joined: Mon Jan 21, 2008 5:51 pm

Re: How should links be written i user defined tags?

Post by Jeff »

Not sure what is going on. Might be something else in the UDT that is causing the problem.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: How should links be written i user defined tags?

Post by calguy1000 »

This is not a CMSMS issue, it's a general programming issue... better asked on a different board.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Terabyte
Forum Members
Forum Members
Posts: 79
Joined: Fri Aug 18, 2006 8:57 am

Re: How should links be written i user defined tags?

Post 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:

Code: Select all

echo '<a href=" ">Test</a>';	
This don't work and give blank output:

Code: Select all

echo '<a href="test">TestTestTestTest</a>';	
Last edited by Terabyte on Thu Sep 24, 2009 4:20 pm, edited 1 time in total.
Terabyte
Forum Members
Forum Members
Posts: 79
Joined: Fri Aug 18, 2006 8:57 am

Re: How should links be written i user defined tags?

Post 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.
Terabyte
Forum Members
Forum Members
Posts: 79
Joined: Fri Aug 18, 2006 8:57 am

Re: How should links be written i user defined tags?

Post 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.
Last edited by Terabyte on Thu Sep 24, 2009 4:32 pm, edited 1 time in total.
Jeff
Power Poster
Power Poster
Posts: 961
Joined: Mon Jan 21, 2008 5:51 pm

Re: How should links be written i user defined tags?

Post 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.
Terabyte
Forum Members
Forum Members
Posts: 79
Joined: Fri Aug 18, 2006 8:57 am

Re: How should links be written i user defined tags?

Post 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.
Jeff
Power Poster
Power Poster
Posts: 961
Joined: Mon Jan 21, 2008 5:51 pm

Re: How should links be written i user defined tags?

Post 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.
Jos
Support Guru
Support Guru
Posts: 4020
Joined: Wed Sep 05, 2007 8:03 pm

Re: How should links be written i user defined tags?

Post 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  8)
Post Reply

Return to “CMSMS Core”