(Solved) THIS_SCRIPT for Archive?
#1
Hi Guys,

Im fixing a very old plugin for MyBB the problem I have at this final part is the next one:

The plugin in basic, change the format of the URL, that works OK, in all the forum I use, for example:

THIS_SCRIPT == "showthread.php" - etc etc

And thats works OK.-

But how I can put this condition to my function, for the archive? because the archive is /archive/index.php?123.html

Thanks!
Reply
#2
basically THIS_SCRIPT is defined in regular php files of MyBB system.
to get plugins work on the archive section, you can try using archive_start hook
Reply
#3
Try the IN_ARCHIVE constant.

if(defined('IN_ARCHIVE'))
{
	// we are in the archive.
}
Reply
#4
Thanks .m. for the data that give me a good idea!



Hi Omar, Thanks for your time

I will check it.-



Well works OK with IN_ARCHIVE

I duplicate the function with another name put the hook to archive_start and define IN_ARCHIVE, works fine.-

Thanks to all for your time!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)