SimplePortal

Customization => Custom Coding => Topic started by: Ria on January 18, 2016, 11:02:24 PM

Title: Change the action name
Post by: Ria on January 18, 2016, 11:02:24 PM
How can i change the action name?

I mean, instead of index.php?action=forum change it to ?action=something
Title: Re: Change the action name
Post by: Eliana Tamerin on January 18, 2016, 11:20:16 PM
I believe you can change any action name in your root index.php.
Title: Re: Change the action name
Post by: ♦ Ninja ZX-10RR ♦ on January 19, 2016, 12:31:04 AM
No Eliana, it's not that easy at all, I wanted to do it once but I ended up leaving it as it is, because the "easiest" way was to hook it with $buffer and wasn' t even working :/ Just tried to rename like register2 with register3 and the registration fails (sent to board index, invalid action).
Title: Re: Change the action name
Post by: Eliana Tamerin on January 19, 2016, 01:58:16 AM
Ahh, right, my bad. Because not only does that file register the actions, but each action expects it to be called as such.

You'll have to open BoardIndex.php and alter this line as well:
Code: [Select]
if (!empty($_GET) && $_GET !== array('action' => 'forum'))
My naive thinking believes this will work. There may be some other linkage to clean up, you can look through the install.xml file for SimplePortal and see where the references to action=forum are besides those two. Mostly it's just little references here and there.
Title: Re: Change the action name
Post by: Ria on January 19, 2016, 03:58:32 PM
Well i edited all the "forum" references and it actually work. However, now the portal isn't there, it don't load. Any advice?
Title: Re: Change the action name
Post by: Chen Zhen on January 19, 2016, 07:11:56 PM

There are 2 edits within the main index.php file, several within ../Sources/Subs-Portal.php & one edit within ..Sources/PortalMain.php
It could be more as I just briefly looked and did not test.
SimplePortal 2.3.8 © 2008-2024, SimplePortal