SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Custom Action Mod

Started by Norv, May 09, 2006, 08:35:29 PM

Previous topic - Next topic


Can I install this to 1.1.8 with package manager or do I have to install it manually??
Team Fortress 2 - Online! [nonactive]


Quote from: KraTe on April 15, 2009, 08:15:30 AM
Can I install this to 1.1.8 with package manager or do I have to install it manually??

ok looks like it works.. forget the above
Team Fortress 2 - Online! [nonactive]


Exist any update to 1.1.8?   
I just discovered 1.1.8 messed up all my sub-actions.

thanks in advance.
best regards


ok -- this has a upgrade next to it when i click upgrade i get

QuoteSorry, but there is no upgrade package from your version. Please uninstall the previous version, and install this version. You won't lose any data.

QuoteInstall Actions
Installations actions for "Custom Action Mod":
The package you are trying to download or install is either corrupt or not compatible with this version of SMF. 

In the Package Manager it says

QuoteCustom Action Mod 3.0   [ Upgrade ] [ List Files ] [ Delete ]

any thoughts ??


And how are you supposed to create actions if there is nothing in the admin panel? The "index.php?action=admin;area=featuresettings;sa=action" address simply takes me to the index page.

Can you create login/logout landing pages with this mod that you can add custom code to?


Quote from: robinrobin on April 23, 2009, 11:03:44 AM
And how are you supposed to create actions if there is nothing in the admin panel?
If you have no entry in your Admin CP then you've not 100% successfully installed the mod.  Try taking a look at your error log or noted Test Failed entries when you installed the mod.
"An important reward for a job well done is a personal sense of worthwhile achievement."

[ Themes ]


Hmm, well, i only had one problem, with the Admin.php file, but i added that manually. Like the guy here. Sorry for having so many troubles, Rumbaar, lol. I don't know why i always have them.


No entries in your error log about undefined indexes?  What language are you using?
"An important reward for a job well done is a personal sense of worthwhile achievement."

[ Themes ]


My error log is actually completely empty... that's kinda odd, isn't it?? Maybe it pruned it right after i isntalled the mod or something. Oh, it's English.


Or no, wait, what error log? I don't even have such a thing in my logs page in my ACP. The Custom Action mod's log thing is here though, but it shows no errors in it. I just see these:

Admin Log       Moderation Log       Ban Log       Spider Log       Task Log       Log Pruning             Custom Actions            


No under maintenance in your AdminCP, as what you've posted don't seem to be entries for that location.  You also have to have error logging enabled I'm sure.
"An important reward for a job well done is a personal sense of worthwhile achievement."

[ Themes ]


Uh, i'm sorry, but i can't find no error log in there either.


Optimize all tables
Backup Database
Convert the database and data to UTF-8



Check all files against current versions
Find and repair any errors (Didn't find any)
Recount all forum totals and statistics
Empty out unimportant logs
Empty the file cache





What version of SMF are you using?

AdminCP->Features and Options->General=>Enable error logging
Check Log:
AdminCP=>Forum Error Log

AdminCP->Security and Moderation->General=>Enable error logging
Check Log:
"An important reward for a job well done is a personal sense of worthwhile achievement."

[ Themes ]


Just a note about the Custom Actions Log entry. As far as I can tell this is the result of the suggestion given about the change in Admin.php. It will on purpose put the AdminCP entry for Custom Actions in this place (at least on 2.0RC1). So, this isn´t any special logs for Custom Actions, it´s supposed to be the link to the settings. But that´s as far as I´ve gotten too, since it doesn´t really do anything when pressed (it defaults to displaying the error log, but that has nothing to do with it´s intentional purpose).

I suggest putting the link under "Configuration" / "Modifications" instead. This should be somewhere just after line 200 in Admin.php. Search for // Mod Authors for a "ADD AFTER" on this line. and make the change above this. If anyone running RC1 can tell me exactly what to put there to also make the link work, I would be very grateful.


First - the change to Admin.php mentioned above is in this message:

Second - I missed this earlier:

Quote from: NIBOGO on February 13, 2009, 06:51:41 PM
The MOD works pretty cool on SMF 2.0 RC1 , You just have to go:;area=featuresettings;sa=action

So - another guess since I'm not able to test this at the moment - a solution would possibly be to edit the change to Admin.php to include the link above. I'll experiment with this and get back with the results in a day or two when I'm back home again.


Hmm, i thought there was something odd about that link, Fredrik. I'll look into that now.


Oh wow, Rumbaar, thank you! How could i have missed that? lol, that's an important one!

Uh.... wow... ok, lol, i get errors all the time simply visiting around in the ACP. When i activated the error logging just now, i had 7 errors. Clicking on "Undefined" i got two more! Clicking on "Admin Log" and going back to the error log, i got 18 errors in there! What on earth is going on?!

Edit: Ok, so two undefined errors are repeating themselves all the time because i installed the new version of the Gallery2 bridge yesterday but it didn't install completely, so those should go away when i fix that mod. These are the errors that i have that i don't know where they came from:
1024: Canview method for getMembersOnlineTodayStats() function is not allowed
File: /public_html/forum/Sources/Admin.php
Line: 205

When i click on the File address above, a window opens that shows where the error is in the code. And i then see this:

// Default is that only registered users can see the list.
if (!isset($membersOnlineTodayOptions['canview']))
$membersOnlineTodayOptions['canview'] = 'registered';

// Not allowed canview method? Bang! Error!

elseif (!in_array($membersOnlineTodayOptions['canview'], $allowed_canview_options))
trigger_error('Canview method for getMembersOnlineTodayStats() function is not allowed', E_USER_NOTICE);

That is quite odd i think, because i'm logged in as administrator, so uh, why am i not allowed to view online members today?

8: Undefined index: label
File: /public_html/forum/Themes/default/GenericMenu.template.php (generic_menu_sidebar_above sub template - eval?)
Line: 306

That one doesn't have a link to where the error is when i hover the mouse over the File address.


@robinrobin You should create a support thread in the 2.0 (I'll assume 2.0 as you've not stated still) section, as I'm sure all the errors you are getting aren't mod specific and this is not the place to discuss it.
"An important reward for a job well done is a personal sense of worthwhile achievement."

[ Themes ]


Hi again,

Here´s one way to make a working link in Admin CP for SMF 2.0 RC1. This IS NOT 100% clean, and my only reason for posting this is that someone else might see it and know how to improve it. I´m really no expert at SMF, so please remember this before you blame me for anything bad happening. I suggest you use this for reference only, but that´s up to you. I´ll just say this once again to make sure you get it - I´m not taking any responsibility if you use this method! But it does work, and as far as I can tell it does not produce any errors. Anyway, this is what I did:

First - Install the mod and ignore the error in Admin.php.

Find this passage in Admin.php (somewhere around/just after line 200). Please note the two ), at the end:

// Mod Authors for a "ADD AFTER" on this line. Ensure you end your change with a comma. For example:
// 'shout' => array($txt['shout']),
// Note the comma!! The setting with automatically appear with the first mod to be added.

AFTER this I added the following:

//This is a working link for Custom Actions settings page
'customaction' => array(
'label' => $txt['custom_action_shorttitle'],
'file' => 'CustomAction.php',
'custom_url' => $scripturl . '?action=admin;area=featuresettings;sa=action',

Please note the following:

1) 'customaction' is something I made up. I didn´t know what else to put there, and for this to work I don´t think it matters, as long as nothing else uses the same name.

2) The link will show up in Admin CP under "Configuration"

3) It will have the same subsections as "Features and Options" - these links will work, but obviously has nothing to do with the Custom Action mod. I just don´t know how to get rid of them. Custom Action only has one main page for settings.

4) I think that a better place to make the change is a few rows up (not at least because the comment more or less tells you to), placing the link in Configuration/Modifications, but I can´t get this to work at the moment.

5) A much better way to make this change is to unzip the mod pack, change the instruction for Admin.php in modifications.xml, repack it, and install it the normal way, but at the moment I can´t get this to work.

6) A last advice for those of you using some other language than english (which results in that you can´t see any buttons etc. on the settings page). Unpack the mod and look in modifications.xml. There is an entry for "ManageSettings.english.php". You need to add the same text strings to "ManageSettings.your_language.php". If you really need this, but can´t figure it out - let me know and I can provide more detailed instructions.

Best regards,




I have SMF 1.1.8  and i want to include a php page into my forum. I have used custom actions mod (an php page), but then it gives me this error

Parse error: syntax error, unexpected '<' in /home/bimeiden/domains/ : eval()'d code on line 1

I have a custom theme..

I have the page attached that i want to include... its a chat...

what can i do?
Sorry for my poor English, but i think it's probably better then your Dutch :)


Try taking out the <?php and ?> tags at the very beginning and end of your chat page