Customizing SMF > SMF Coding Discussion

How to change link in this line of code?

(1/1)

ApplianceJunk:
I have this line of code I'm working with and trying to change.
As it's being used now it creates a link that takes you to the register page.

I would like to change it so the link take you to another site.
Let's just say for example I want the link to take you to, http://www.simplemachines.org


--- Quote ---<a href=\'' . $scripturl . '?action=register\'>' . JavaScriptEscape($modSettings['imiyf_txt']) . '</a>
--- End quote ---

Could someone post the code as it should be if the link was to take you to, http://www.simplemachines.org

I have tried a dozen different ways and just keep getting blank pages on my test site.

Thanks,

ChalkCat:
As everybody knows, I'm no coder, and I'm probably going to look really stupid here by oversimplifying it, but if you just want to change it to a simple link, will plain html not do?


--- Code: ---<a href="http://www.simplemachines.org">whatever text</a>
--- End code ---

ApplianceJunk:
Thanks for the reply, but that don't work for me.

Think I need to keep the this part in it.

--- Code: --- . JavaScriptEscape($modSettings['imiyf_txt']) .

--- End code ---

When I say it don't work for me I mean that when I try and replace the code I posted with what Sabrinova posted the mod stops working for me, but my website still works.

This is the mod I got the code from.
http://custom.simplemachines.org/mods/index.php?mod=3107

I did asked in the support thread for that mod too, but after I posted there I thought that maybe I should ask in the coding section for help instead being it's not really a problem with the mod, but a problem I have trying to rework the mod to suite my own personal needs.

Thanks,

ApplianceJunk:
Got it, lol...

Changed this.

--- Code: ---<a href=\'' . $scripturl . '?action=register\'>' . JavaScriptEscape($modSettings['imiyf_txt']) . '</a>
--- End code ---

to this...


--- Code: ---<a href=http://www.simplemachines.org>' . JavaScriptEscape($modSettings['imiyf_txt']) . '</a>
--- End code ---


Let's all have a good laugh now at just how simple that was, lol...

Navigation

[0] Message Index

Go to full version