Staus of URL's created in e.g. CMSModule::CreateReturnLink

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Locked
tomphantoo
Forum Members
Forum Members
Posts: 15
Joined: Mon Apr 11, 2011 7:33 am

Staus of URL's created in e.g. CMSModule::CreateReturnLink

Post by tomphantoo »

Do any of you have experience with, and/or can you suggest a use-case for, CMSModule::CreateReturnLink() ?

I'm wondering because the method produces a string with an embedded URL which can be partially-'entitized' (not e.g. urlencoded). I think such anchor would (if actually modified) be unusable verbatim in a browser. Nor would the $onlyhref-returned URL be usable as-is.

Ditto for CMSModule::create_url().

Should we correct something here?
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: Staus of URL's created in e.g. CMSModule::CreateReturnLi

Post by calguy1000 »

I would not use any PHP method for creating a 'link', and consider all of them to be 'legacy code'.

Bettter solution is to to give URL's to smarty and then build the link tag, or whatever else (javascript etc). in the template.

Whether the function is buggy or not is irrelevant. consider that the URL is your 'data' give it to smarty to render it as a link or whatever inside your template.
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.
Locked

Return to “Developers Discussion”