hey everyone... me again :D
i am creating a mod, but ther is some minor problem,
one of the first i'm thinking of is te following:
When somebody is gonna install the mod, it addes something to the following code:
(code snippet from index.template)
if (in_array($context['current_action'], array('search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm')))
$current_action = $context['current_action'];
now, when making the package, would i just FIND the code and REPLACE it with the new code(then if any other mod's modefied that code thay are broken), or should i FIND that code and use ADD BEFORE or a ADD AFTER 'search',
statement.
the rest will be taken care of later, this is the one that most puzzeled me...
if anyone would be able to help, i would apreciate it!!! :)
cheers
Well what changes to do you want to make?
well its for the bookmark mod i'm creating for smf,
i want to add 'bookmarks' to that array, now if i replace that whole code, it can messup other mods installed that use that code... but i dont know i i can use add after, or add bofore instead of replace...
Well you could do add after if you were careful with your linebreaks, but it's probably easiest to use replace.
ok thanks for your advice, ill will first to to use add after before using replace, dont want my mod disableing other mods
It won't make a difference to other mods which you use.