Link to Mod (http://mods.simplemachines.org/index.php?mod=331)
This mod will add an unlimited number of custom actions, configurable in Features and Options. There are 3 types, HTML, BBC, and PHP. They can be accesed by going to http://www.yoursite.com/smf/index.php?action=action name. Each action has an unlimited number of sub-actions, which can be accessed by going to http://www.yoursite.com/smf/index.php?action=action name;sa=sub-action name.
Enhancement for it:
If you wish to make it work with the link tree, you may find useful these instructions DanCarroll has been nice to share:
Making Link Tree work with Custom Action Mod (http://www.simplemachines.org/community/index.php?topic=86793.msg3193990#msg3193990)
nice very nice good job
Very useful mod ;) Thanks
Bit of a shame that it's not compatible with SMF 1.0.7. :(
3. Execute Modification ./Sources/ModSettings.php Test failed
want to do a friend a favor and help him out with this ;'( i want to use it
odd thing is it works with my modtest forum :'(
Quote from: uberjon on May 10, 2006, 04:46:14 PM
3. Execute Modification ./Sources/ModSettings.php Test failed
want to do a friend a favor and help him out with this ;'( i want to use it
odd thing is it works with my modtest forum :'(
what other mods do you ahve installed?
Mod Name Version
1. Karma Description Mod 1.9.7
2. Custom Profile Mod 2.14 ---- tried to update to your latest version and my error logs got flooded again. :'(
3. SMF 1.0.7 / 1.1 RC2 Update 1.0
4. Users Online Today Mod 1.3.1
5. Membergroup Color Legend 1.1
6. Custom Action Mod 1.0 - uploaded only not installed.
7. PJIRC Integrated Chat Mod 2.0
i got all those
i have the exact stuff installed on my mod test site.
only diference is on the mod test site i temporarly used tp for a bit but removed it.
would it be possible for me to make a copy from one modsetting.php and put in the other source area? making a backup of the orginal of course.
edit::: eh was inpatient :/ i tried that with the copy from the modtest it worked ;) :D
could you pm me your modsettings.php?
also, could you please post the error getting with the custom profile field mod in the mods topic so I can fix it :)
would be nice to have a "delete action" option
Quote from: electrohome on May 11, 2006, 09:33:47 PM
would be nice to have a "delete action" option
That'll be in next version
--------------------------------------------------------------------------------
Yea as I said
It installed ok
I saw that tab
What does it do
Where does that link go to
is there any help file to show you how to run it
I am a stupid newby Grin
Quote from: Garry on May 12, 2006, 07:50:27 PM
--------------------------------------------------------------------------------
Yea as I said
It installed ok
I saw that tab
What does it do
Where does that link go to
is there any help file to show you how to run it
I am a stupid newby Grin
click on the link, and then click on add an action
Quote
--------------------------------------------------------------------------------
Yea as I said
It installed ok
I saw that tab
What does it do
Where does that link go to
is there any help file to show you how to run it
I am a stupid newby Grin
Quote
click on the link, and then click on add an action
What is an
ACTIONWhere do I find the
list of ACTIONSI am a newby and I dont understand a lot of this
I am used to programs that have help screens or a tutorial to show you how to use the new functions
What was that link to supposed to be for ...............
click on it and see where it goes and then please tell me what it means http://www.yoursite.com/smf/index.php?action=action
Quote from: Garry on May 12, 2006, 09:31:21 PM
[quote ]
--------------------------------------------------------------------------------
Yea as I said
It installed ok
I saw that tab
What does it do
Where does that link go to
is there any help file to show you how to run it
I am a stupid newby Grin
Quote
click on the link, and then click on add an action
What is an
ACTIONWhere do I find the
list of ACTIONSI am a newby and I dont understand a lot of this
I am used to programs that have help screens or a tutorial to show you how to use the new functions
[/quote]
go to features and options in the admin panel, and then click on "Custom Actions", and then click on "Add an action"
Quote
click on the link, and then click on add an action
What is an
ACTIONWhere do I find the
list of ACTIONSI am a newby and I dont understand a lot of this
I am used to programs that have help screens or a tutorial to show you how to use the new functions
I am not trying to be smart or nasty as I know you are trying to help me
But could you take the time to read my post and answer the questions i have asked !!!![/quote]
go to features and options in the admin panel, and then click on "Custom Actions", and then click on "Add an action"
[/quote]
I have done as you said by going to the
Admin
Features and Options
ADD an actionNow I have two areas that I dont know what they are for !!!!!!
What the Hell is an ACTION ??????
Can you please take the time to read my questions
Garry, if you don't know what this mod does, why did you install it?
I would like to have an example of what this mod does exactly, please ::)
Maybe is something i can use it and don`t know it`s there.....
Thanks
Quote from: karone on May 13, 2006, 02:21:36 AM
Garry, if you don't know what this mod does, why did you install it?
I installed it becuase it is the only way you can see if it is something you like or not
I didn't know that it would be so hard for
" winrules " to
read my question and
give me a straight answerThis isnt a complaint as the FORUM was FREE and the MODS that I have installed were FREE and as we all know ....
Beggers cant complain about the generosity of others , but being a newbie to this kind of thing , I didnt know that you have to ask a question about 6 times and in 3 or 4 different formats before it will get answered .............
There are no help screens or instructions with these MODS so how do you know if they are doing what there supposed to do if you dont know what to type into the text boxes and data input areas to make them work.............
I may sound like i am whinning or angry , but I am not . Id just like to know what I am supposed to do with a Mod so I can determine if it is working or if it is of any walue to me for what I am doing
http://www.simplemachines.org/community/index.php?action=unread
http://www.simplemachines.org/community/index.php?action=unreadreplies
http://www.simplemachines.org/community/index.php?action=stats
http://www.simplemachines.org/community/index.php?action=mlist
http://www.simplemachines.org/community/index.php?action=profile
These are all actions. Actions are stuff you do in forums. This mod lets you make custom actions more easily.
Wow I am pretty impressed with the examples as they do many things I have been trying to do
Would there be an example of the code that was put into the box in the actual MOD to show how it is done
As it says in the description, you can use either html, BBCode or php.
I guess I am a total idiot and cant simplly express the concept of
do you have an example of the code that I am to use
I am really trying to learn some things here and I feel like a total idiot becuase I think I am asking the correct questions , but I dont seem to be getting anywhere
Can someone tell me what goes in each area and
where do I learn more about what I would need to know to put in the code area
In example.....
What code would I put in the code box to do this
http://www.simplemachines.org/community/index.php?action=mlist
I understand now what this mod does, thanks a lot eldacar ..!!
Garry, i think you must be a coder to make an action, you put html or php code in this box ::)
Overall, NICE MOD !!!!!!!!!!!
Quote from: mforum on May 13, 2006, 09:47:31 AM
I understand now what this mod does, thanks a lot eldacar ..!!
Garry, i think you must be a coder to make an action, you put html or php code in this box ::)
Overall, NICE MOD !!!!!!!!!!!
Yes I see that youu need to put some code in the box
what I am hoping is that someone will post what needs to go in the box so I can see it work on my own forum and start to understand it
What goes into the box depends from the action you wanna make ;)
It would be usefull for us newbies someone post the code of a certain action :)
Quote from: mforum on May 13, 2006, 10:11:01 AM
What goes into the box depends from the action you wanna make ;)
It would be usefull for us newbies someone post the code of a certain action :)
This is what I have been trying to say for over 12 hours
Like a quick copy and paste into the code function in a post and we could see and use it to understand what it is all about
what type of example would you like to see?
You don't need this mod to use the default smf features, link the memberlist (?action=mlist)
Any example would be great
and any help in using the
Quotedefault smf features, link the memberlist (?action=mlist)
would be greatly appreciated
Like where would I find all the actions that are available
Im just an old guy trying to learn something new for the fun of it
thanks for the reply
Quote from: Garry on May 13, 2006, 10:13:31 PM
Any example would be great
and any help in using the Quotedefault smf features, link the memberlist (?action=mlist)
would be greatly appreciated
Like where would I find all the actions that are available
Im just an old guy trying to learn something new for the fun of it
thanks for the reply
there is a long list of theme in the actionArray in index.php.
You can use this mod to make a rules page or you can make article pages etc. You can put any kind of info you want in there and it will be surrounded by the forums format. It doesn't have to be some kind of forum code.
Its very handy.
Quote from: woden on May 14, 2006, 12:20:11 AM
You can use this mod to make a rules page or you can make article pages etc. You can put any kind of info you want in there and it will be surrounded by the forums format. It doesn't have to be some kind of forum code.
Its very handy.
Thanks woody
Can you copy what you have in one of the action boxes " such as a Rules page " and paste it in to a post , so I can see what your talking about
along with the name and other stuff that the action mod calls for
also
what goes in the other boxes and where do I find "
The Output " this action makes and how do you call it
Like all I am looking for is someone to show me what they have put into to data imput areas
and tell me where I find the output from the action Mod
I really cant believe how hard this has been to get someone to show me what to do
when you fill in the form:
name is the name of the action (or webpage), if you put rules, then when you get ready to link to it use forum/index.php?action=rules
type is either HTML, BBC or PHP, you pick which one you'll be using
page title is what will show in the browser window as the page title, not the file name
code is where you type in your info, webpage stuff, pictures etc, your content for the page
for instance
<h3>This page was made with the custom action mod</h3>
Ain't it nifty
for a real example see http://www.shelldwellers.com/index.php?action=articles
great mod! thanks!
A thank You to all who had the patients with me to get me through learning how to run this mod
As a newbie , I find many MODS on here hard to understand as there are no real instructions with them for us old Farts that are PHP Forum Challenged
Thank you all again
Woden
If I may ask you a couple of questions ?
On that forum you sent me to to see a real example
- How did you change the Menu Choices to what you wanted
- Do you know anything about the AD Mod
- Would know how to write the code to show a simple JPEG in the AD Mod
Great mod!
I did notice on thing though - when looking at Who's Online all the actions appear to be "Unknown Action" Is this normal?
Thanks!
When I try to install this I get
Quote500 USER: command requires a parameter.
any ideas what it means?
Great mod! Use it to show my forum rules in the menü. But one question about it:
I get a lot of errors like this:
8: Use of undefined constant rules - assumed 'rules'
Datei: /srv/www/htdocs/web78/html/smfport/Themes/default/Admin.template.php (eval?)
Zeile: 492
8: Use of undefined constant rules - assumed 'rules'
Datei: /srv/www/htdocs/web78/html/smfport/Themes/default/PersonalMessage.template.php (eval?)
Zeile: 492
...And so on. That were about 40 sites of error messages like this one day! How can I fix this? I'm using 1.1RC2 with default theme. These mods are installed: Custom Action Mod, Security Patch, Custom Profile Field, Sticky First Post.
Installed with no errors ...
But if i add a action ....(php)
Parse error: parse error in Sources\Load.php(1623) : eval()'d code(7) : eval()'d code on line 1
how to solve?
And i thought the added action woulld be in a table in same layout... its now shown UNDER excisting layout ...(when adding BBC or html)
Here my html action:
Quote from: digit on May 14, 2006, 02:13:38 PM
Great mod!
I did notice on thing though - when looking at Who's Online all the actions appear to be "Unknown Action" Is this normal?
Thanks!
You have to define what the action is, so in who.yourlanguage.php in themes/default/languages you would have to add a string for $txt['whoall_youraction']
Quote from: lj on May 14, 2006, 08:33:20 PM
When I try to install this I get Quote500 USER: command requires a parameter.
any ideas what it means?
Have you successfull installed any other mods?
Quote from: nehcregit on May 15, 2006, 05:45:33 AM
Great mod! Use it to show my forum rules in the menü. But one question about it:
I get a lot of errors like this:
8: Use of undefined constant rules - assumed 'rules'
Datei: /srv/www/htdocs/web78/html/smfport/Themes/default/Admin.template.php (eval?)
Zeile: 492
8: Use of undefined constant rules - assumed 'rules'
Datei: /srv/www/htdocs/web78/html/smfport/Themes/default/PersonalMessage.template.php (eval?)
Zeile: 492
...And so on. That were about 40 sites of error messages like this one day! How can I fix this? I'm using 1.1RC2 with default theme. These mods are installed: Custom Action Mod, Security Patch, Custom Profile Field, Sticky First Post.
Have you added any other code (ie in the menu bar), if so can you post it?
Quote from: Silence on May 15, 2006, 10:28:43 AM
Installed with no errors ...
But if i add a action ....(php)
Parse error: parse error in Sources\Load.php(1623) : eval()'d code(7) : eval()'d code on line 1
how to solve?
And i thought the added action woulld be in a table in same layout... its now shown UNDER excisting layout ...(when adding BBC or html)
Here my html action:
With the parse error, that's an error in the code you're entering, not with the mod. If you post the code you're using I can help you fix it. With the layout, I don't get what you mean, isn't that what it's supposed to do?
i tried this in php action box :
<?
echo"JUST A TEST FOR PHP ACTION"
."";
?>
this gives error ...
you don't need the <? and ?>
ahhhhhhhhhhhhhhhhhhhhhh
YOU ROCK!!
now to find out how to get the output in layout(table) ..
ie like the normal actions...index.php?action=help ...
Quote from: Silence on May 15, 2006, 05:07:25 PM
ahhhhhhhhhhhhhhhhhhhhhh
YOU ROCK!!
now to find out how to get the output in layout(table) ..
ie like the normal actions...index.php?action=help ...
OK, I see what you mean by that, but I won't make it do that by default, I want it to be as custimizable as it can be, you could just copy the HTML from those other pages.
not possible to create in mod a wrap or something?... so that it would automaticly come in table .. in theme layout ...
further more this is a great mod!!
Quote from: Silence on May 15, 2006, 06:11:45 PM
not possible to create in mod a wrap or something?... so that it would automaticly come in table .. in theme layout ...
further more this is a great mod!!
just copy the html from the theme and put it in the page.
Quote from: winrules on May 15, 2006, 04:13:14 PM
Quote from: digit on May 14, 2006, 02:13:38 PM
Great mod!
I did notice on thing though - when looking at Who's Online all the actions appear to be "Unknown Action" Is this normal?
Thanks!
You have to define what the action is, so in who.yourlanguage.php in themes/default/languages you would have to add a string for $txt['whoall_youraction']
Perfect - thanks. Now, how do I delete an action?
Quote from: digit on May 16, 2006, 06:29:04 AM
Quote from: winrules on May 15, 2006, 04:13:14 PM
Quote from: digit on May 14, 2006, 02:13:38 PM
Great mod!
I did notice on thing though - when looking at Who's Online all the actions appear to be "Unknown Action" Is this normal?
Thanks!
You have to define what the action is, so in who.yourlanguage.php in themes/default/languages you would have to add a string for $txt['whoall_youraction']
Perfect - thanks. Now, how do I delete an action?
Just empty the action box and name and after that ....safe ... this how it works for me ...
how to hide the costum action for guest??
Quote from: digit on May 16, 2006, 06:29:04 AM
Quote from: winrules on May 15, 2006, 04:13:14 PM
Quote from: digit on May 14, 2006, 02:13:38 PM
Great mod!
I did notice on thing though - when looking at Who's Online all the actions appear to be "Unknown Action" Is this normal?
Thanks!
You have to define what the action is, so in who.yourlanguage.php in themes/default/languages you would have to add a string for $txt['whoall_youraction']
Perfect - thanks. Now, how do I delete an action?
Err you can't right now but that will be in next version :)
Quote from: Sakuragi on May 16, 2006, 11:51:05 AM
how to hide the costum action for guest??
make the page php type and put a call to "is_not_guest()" at the top.
Quote from: winrules on May 15, 2006, 04:13:14 PM
Quote from: nehcregit on May 15, 2006, 05:45:33 AM
Great mod! Use it to show my forum rules in the menü. But one question about it:
I get a lot of errors like this:
8: Use of undefined constant rules - assumed 'rules'
Datei: /srv/www/htdocs/web78/html/smfport/Themes/default/Admin.template.php (eval?)
Zeile: 492
8: Use of undefined constant rules - assumed 'rules'
Datei: /srv/www/htdocs/web78/html/smfport/Themes/default/PersonalMessage.template.php (eval?)
Zeile: 492
...And so on. That were about 40 sites of error messages like this one day! How can I fix this? I'm using 1.1RC2 with default theme. These mods are installed: Custom Action Mod, Security Patch, Custom Profile Field, Sticky First Post.
Have you added any other code (ie in the menu bar), if so can you post it?
Sure. Have made a link to the forum rules:
// Work out where we currently are.
$current_action = 'home';
if (in_array($context['current_action'], array('admin', 'ban', 'boardrecount', 'cleanperms', 'detailedversion', 'dumpdb', 'featuresettings', 'featuresettings2', 'findmember', 'maintain', 'manageattachments', 'manageboards', 'managecalendar', 'managesearch', 'membergroups', 'modlog', 'news', 'optimizetables', 'packageget', 'packages', 'permissions', 'pgdownload', 'postsettings', 'regcenter', 'repairboards', 'reports', 'serversettings', 'serversettings2', 'smileys', 'viewErrorLog', 'viewmembers')))
$current_action = 'admin';
if (in_array($context['current_action'], array('search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm', 'rules')))
$current_action = $context['current_action'];
if ($context['current_action'] == 'search2')
$current_action = 'search';
if ($context['current_action'] == 'theme')
$current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' ? 'profile' : 'admin';
// Are we using right-to-left orientation?
if ($context['right_to_left'])
{
$first = 'last';
$last = 'first';
}
else
{
$first = 'first';
$last = 'last';
}
// Show the start of the tab section.
echo '
<table cellpadding="0" cellspacing="0" border="0" style="margin-left: 10px;">
<tr>
<td class="maintab_' , $first , '"> </td>';
// Show the [home] button.
echo ($current_action=='home' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'home' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '">' , $txt[103] , '</a>
</td>' , $current_action == 'home' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
// Show the [rules] button.
echo ($current_action == 'rules' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'rules' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=rules">' , $txt[rules] , '</a>
</td>' , $current_action == 'rules' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
Addes "rules" there twice. Once for the change of the active tab and the second for the link himself. Any errors in my code?
Can i make with this mod a button in index that links to a certain action, like chat or gallery ? ???
If yes, what is the code i `ll put ?
Quote from: mforum on May 17, 2006, 03:40:36 AM
Can i make with this mod a button in index that links to a certain action, like chat or gallery ? ???
If yes, what is the code i `ll put ?
This mod will create the actions, this tutorial (http://www.simplemachines.org/community/index.php?topic=63203.0) might help you.
Thanks winrules, you `ve been very helpfull ..!! :)
When I added a page it didnt show in the Menu bar. Any reason?
Any chance to have this mod compatible with smf 1.0.7?
Thank you!
Quote from: littleone on May 18, 2006, 11:40:16 AM
When I added a page it didnt show in the Menu bar. Any reason?
Because you have to manually add it to the menu
Quote from: ivo2296 on May 18, 2006, 12:43:14 PM
Any chance to have this mod compatible with smf 1.0.7?
Thank you!
No...You couldtry using the Static Page Mod (http://mods.simplemachines.org/index.php?mod=130).
Quote from: L.G.S on May 18, 2006, 01:17:16 PM
Quote from: littleone on May 18, 2006, 11:40:16 AM
When I added a page it didnt show in the Menu bar. Any reason?
Because you have to manually add it to the menu
Also in the next version I might add an option to show a button in the menu bar.
This looks to be a great mod.
Any plans to integrate secondary actions into it? (like smf currently has with ;sa, http://www.simplemachines.org/community/index.php?action=profile;u=24172;sa=summary)
Quote from: huwnet on May 18, 2006, 04:04:03 PM
This looks to be a great mod.
Any plans to integrate secondary actions into it? (like smf currently has with ;sa, http://www.simplemachines.org/community/index.php?action=profile;u=24172;sa=summary)
Good idea, I might add something like this. Maybe I could use something like an action settings page...Sort of like my custom profile field mod.
Here is my "Rules" page done using this mod :) (In fact, I could do this myself, but anyway, I've done it by the mod :D)
http://www.turkproje.org/forum/index.php?action=kurallar
Select a rule category at the left and read it. For example, "General", "Posting", "Avatar and Signatures", etc...
It is not in english but I'm showing the power of this mod ;)
Woa that's nice, any chance of posting the code you used to have the BG etc?
uhm, what are you calling as BG? (back-ground?)
Don't know what L.G.S. means with BG, but I'm also interested in the code you are using, HarzeM. How did you made the changes to the right table, did you use html and frames?
@winrules: Any idea about my error messages? Am I the only one with this error messages using this great mod?
subactions (as well as any other $_GET variable) can easily by accessed with PHP. Although obviously not with only html or BBCodes.
Thanks a lot, but this doesn't help me a lot :-[
Need some examples to learn ;)
Quote from: HarzeM on May 18, 2006, 05:56:56 PM
uhm, what are you calling as BG? (back-ground?)
Sorry I run a GFX forum so I'm used to posting bg ;D
Yes I mean background
WOW great mod. I have already put it to use in my forum.
http://www.talk-baseball.com/index.php?action=MLB
I just created and HTML page and put to code into a custom action. Works perfect. Thanks!
basicaly this mod imo should be standard on smf because its so useful :D
i love it. well basicaly i love winrules because i know am proud to say i use 2 of his mods on my forum ^^
yo winrules if you would add a board to your forum for this mod. il post some of my example pages in code for people to use.
i searched the web for html templates to make nifty looking pages to use with this and they own ^^
:EDIT:
um. can u make a remove box in next verxsion? so it dont take up room in admin cp :P
Quote from: nehcregit on May 19, 2006, 02:33:21 AM
Don't know what L.G.S. means with BG, but I'm also interested in the code you are using, HarzeM. How did you made the changes to the right table, did you use html and frames?
@winrules: Any idea about my error messages? Am I the only one with this error messages using this great mod?
With the error messages, In the code you added for the button, $txt[rules] should be $txt['rules'].
Quote from: uberjon on May 19, 2006, 01:30:03 PM
basicaly this mod imo should be standard on smf because its so useful :D
i love it. well basicaly i love winrules because i know am proud to say i use 2 of his mods on my forum ^^
yo winrules if you would add a board to your forum for this mod. il post some of my example pages in code for people to use.
i searched the web for html templates to make nifty looking pages to use with this and they own ^^
:EDIT:
um. can u make a remove box in next verxsion? so it dont take up room in admin cp :P
OK i'll do it. There will be a remove action button in the next version.
Quote from: winrules on May 19, 2006, 03:51:54 PM
Quote from: nehcregit on May 19, 2006, 02:33:21 AM
@winrules: Any idea about my error messages? Am I the only one with this error messages using this great mod?
With the error messages, In the code you added for the button, $txt[rules] should be $txt['rules'].
That's all? :-[ Thanks a lot! :)
seems i found a small bug in the action mod :;(
when i try to copy alot of html into the box it does it just fine but when i save it it deletes the last part to make it all fit or somethig :S
just ignore the content in this just to show u how long it is :P
er... nvm wont let me post
QuoteThe following error or errors occurred while posting this message:
The message exceeds the maximum allowed length (65530 characters).
it works well in a program i am using to help me with the html.. but it deletes part of it when i try to use it :'(
can u fix this?
Quote from: uberjon on May 20, 2006, 04:59:16 PM
seems i found a small bug in the action mod :;(
when i try to copy alot of html into the box it does it just fine but when i save it it deletes the last part to make it all fit or somethig :S
just ignore the content in this just to show u how long it is :P
er... nvm wont let me post QuoteThe following error or errors occurred while posting this message:
The message exceeds the maximum allowed length (65530 characters).
it works well in a program i am using to help me with the html.. but it deletes part of it when i try to use it :'(
can u fix this?
It's not a bug, it's that the database column is a TEXT column, which limits the data to 65535 characters. If you want to use this mod with a something longer than that, you will have to set the "value" column in the settings table to MEDIUMTEXT or LONGTEXT.
Version 2.0 has been released! This version adds an option to delete actions, and adds sub-actions.
What is an sub-action ? ???
sa=something
Has anyone tried this mod with Tiny Portal yet?
Quote from: gerrymore on May 22, 2006, 05:32:09 PM
Has anyone tried this mod with Tiny Portal yet?
I use tinyportal, too. It should work just fine.
omg.
*sings praises for this mod*
Now, how do I associate the custom action with a description in the 'Who's Online' ... Right now, it says "unknown action"
I also created a button for my custom action. However, click on the button does not highlight the background of the button itself; instead the 'Home' button becomes highlighted. My custom button does work for my custom action, but the button does not visually indicated that it is the one activated.
If you would, you could come to my forum and click on the shop button to see what I'm talking about. (See signature).
Did you use the tutorial in the graphics board? It looks like you skipped step number 1. As for the who's online thing, look here: http://www.simplemachines.org/community/index.php?topic=89923.0
I will also implement that functionabillity into the next version of the mod.
Quote from: winrules on June 04, 2006, 01:21:56 PM
Did you use the tutorial in the graphics board? It looks like you skipped step number 1. As for the who's online thing, look here: http://www.simplemachines.org/community/index.php?topic=89923.0
I will also implement that functionabillity into the next version of the mod.
Yes; thank you.
And by the way, the link is here (http://www.simplemachines.org/community/index.php?topic=63203.0) for making sure the background of the button indicates that the button is activated. The "Step 1" that was mentioned in the quote of this post.
Cheers.
Hi
I installed version 2 after uninstalling version 1
I like the delete an action addition
Not quite sure I understand the logic of the sub action section
can you give me an idea of how that function is sypposed to be used and when
thanks
each sub action can be accessed by going to index.php?action=actionname;sa=subactionname
How to add a menu using the custom action ?
I tried to set it up like the rest of the menus but the new menu does not appear in the nav bar in the default themplate
Look here: http://www.simplemachines.org/community/index.php?topic=63203.0
winrules, i've installed this mod but i've no idea how to use it ... :(
first of all, how do i do this ?
A mod to ask the forummers how did they find out about the site when they are registering themself in the forum.
Version 2.01 has been released! This version adds 1.1 RC3 support.
I've been writing a bunch of php pages through TP and someone suggested that I could use this mod so that I could have a URL that said something like
index?action=gallery
instead of what I have now, which is
index?page=7
Would I need to copy everything from the php page into the textarea that says "code" in the custom actions mod in order to do this? Or is there some way I can tell the custom actions mod "go pick up the php from page 7"?
Quote from: JPDeni on August 24, 2006, 02:38:55 PM
I've been writing a bunch of php pages through TP and someone suggested that I could use this mod so that I could have a URL that said something like
index?action=gallery
instead of what I have now, which is
index?page=7
Would I need to copy everything from the php page into the textarea that says "code" in the custom actions mod in order to do this? Or is there some way I can tell the custom actions mod "go pick up the php from page 7"?
You will have to manually copy it. There is no converter script from TinyPortal articles.
Thank you. That helps a whole bunch. :)
I'm needing a little help with my code. I am trying to pull some of the SSI forum codes using PHP but I keep getting errors. I am not really good with PHP so I'm sure I am making a really stupid mistake.
The code I am trying to use is:
<?php require("/home/fsvzwtpl/public_html/chinclub/forum/SSI.php"); ?>
<?php ssi_recentTopics(); ?>
Don't put in the
<?php
or
?>
Just use
require("/home/fsvzwtpl/public_html/chinclub/forum/SSI.php");
ssi_recentTopics();
Give that a try. :)
That did it. THANKS!! :D
Version 2.02 has been released! This version fixes a security hole. All users are strongly encouraged to upgrade. Big Thanks to HarzeM for discovering the hole.
How do you upgrade? Must you uninstall the first one before instaling the second?
Also, what was the security problem?
Quote from: chinclub on August 27, 2006, 07:24:36 PM
How do you upgrade? Must you uninstall the first one before instaling the second?
Also, what was the security problem?
Just upload the new version, and hit [Upgrade] should work :)
Sorry, but IMO I shouldn't post details about the problem yet.
The only reason I ask is because somehow people have been able to register to my board without my permission. I have it set that all accounts must be approved by admin. I am getting 1-3 porn people a night gaining full access and posting trash on my forum. I can't find out how they are getting in. That is probably not the security hole from this script but I am desperate to find a way to stop it.
Quote from: chinclub on August 27, 2006, 08:58:36 PM
The only reason I ask is because somehow people have been able to register to my board without my permission. I have it set that all accounts must be approved by admin. I am getting 1-3 porn people a night gaining full access and posting trash on my forum. I can't find out how they are getting in. That is probably not the security hole from this script but I am desperate to find a way to stop it.
That shouldn't be caused by this mod...You should make a topic about it in General English Support (http://www.simplemachines.org/community/index.php?board=9.0) if you think it's a SMF issue.
Edit: 1,111th post :)
If I use Type php and add
if ($context['user']['is_guest'])
echo 'You are not allowed to see this page. Please login.';
if ($context['user']['is_logged'])
echo 'This is a test page.';
the page works fine for guests and users as it should be. But, if I try to delete another action I get the error:
QuoteYou have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'user']['is_guest'])
echo 'You are not allowed to see this page
Datei: .../smf/Sources/CustomAction.php
Zeile: 269
What is the mistake? As I know I shouldn't use <php ?> around the php code.
Quote from: Kettu on August 29, 2006, 08:29:57 AM
If I use Type php and add
if ($context['user']['is_guest'])
echo 'You are not allowed to see this page. Please login.';
if ($context['user']['is_logged'])
echo 'This is a test page.';
the page works fine for guests and users as it should be. But, if I try to delete another action I get the error:
QuoteYou have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'user']['is_guest'])
echo 'You are not allowed to see this page
Datei: .../smf/Sources/CustomAction.php
Zeile: 269
What is the mistake? As I know I shouldn't use <php ?> around the php code.
Umm can you try reuploading CustomAction.php?
Quote from: winrules on August 29, 2006, 09:56:17 AM
Umm can you try reuploading CustomAction.php?
Still the same error.
Version 2.03 has been released! This version fixes a bug with deleting fields.
Quote from: Kettu on August 29, 2006, 11:02:48 AM
Quote from: winrules on August 29, 2006, 09:56:17 AM
Umm can you try reuploading CustomAction.php?
Still the same error.
Try this version :)
Quote from: winrules on August 29, 2006, 11:51:38 AM
Version 2.03 has been released! This version fixes a bug with deleting fields.
Quote from: Kettu on August 29, 2006, 11:02:48 AM
Quote from: winrules on August 29, 2006, 09:56:17 AM
Umm can you try reuploading CustomAction.php?
Still the same error.
Try this version :)
;D Now it works. :D
I use TP0.9.5, SMF 1.1rc3, and custom action 2.03, but when I add an action, it is just going back to the forum main page (when I click on the go to page link)
I have checked both of the files to see they uploaded properly, which they have. Any Ideas?
Nice Mode,....very useful,....better then the StaticPageMod (which anyway i wasnt able to install in v1.1rc3)
Much THX 4 this,...
My question: Is it possible to make the Edit (Input) Box wider (its a bit small, and there enough place;))?
(or where need i 2 seach?)
Quote from: Techdomain on September 16, 2006, 08:11:31 AM
I use TP0.9.5, SMF 1.1rc3, and custom action 2.03, but when I add an action, it is just going back to the forum main page (when I click on the go to page link)
I have checked both of the files to see they uploaded properly, which they have. Any Ideas?
What URL does the link point to?
Quote from: mfKG on September 16, 2006, 07:42:46 PM
Nice Mode,....very useful,....better then the StaticPageMod (which anyway i wasnt able to install in v1.1rc3)
Much THX 4 this,...
My question: Is it possible to make the Edit (Input) Box wider (its a bit small, and there enough place;))?
(or where need i 2 seach?)
Not without changing more things than I want to.
http://www.techdomain.com.au/index.php?action=staff
That one is a php, which I tested as an article Here (http://www.techdomain.com.au/index.php?page=30)
I also tried a html one and a bbc one (action=test and action=2) but no luck.
Edit: thanks for the quick reply btw :)
Uhhh can you send me your index.php?
:o
This site continues to suprise... no attachments?
anyway, here is a link:
http://www.techdomain.com.au/index.php.zip
Try replacing it with the attached file.
Only charter members and team members can attach files.
Nice :) if you dont mind me asking - what did you do to it?
oh - it makes sense about the attachments also.
Thanks again :)
Quote from: Techdomain on September 17, 2006, 10:10:27 PM
Nice :) if you dont mind me asking - what did you do to it?
oh - it makes sense about the attachments also.
Thanks again :)
For some reason the changes didn't get applied to that file. I just made the changes that the mod should've done when it was installed.
Oh.. ok. I have found (since then) that I am having to go through every file when I upload a mod as nothing is changing. Something to do with safe mode on the server no doubt.
At any rate, it means I am learning a lot about PHP!
So,
If I wanted to add an action to open another webpage within my forum...
How would I code that in the code box?
Thanks in advance for Helping
This is excellent tool.
What about providing permissions for actions and option to set button for action in main menu, but not just that, how about being able to set button whenever action could be used, for instance, in user profile, in posts.. etc...?
I also would like to be able to set set description and keywords for HTML header for each custom action.
Quote from: PhatTyres on October 01, 2006, 09:21:53 PM
So,
If I wanted to add an action to open another webpage within my forum...
How would I code that in the code box?
Thanks in advance for Helping
You can use a Iframe.
Quote from: Pedja on October 02, 2006, 01:46:30 AM
This is excellent tool.
What about providing permissions for actions and option to set button for action in main menu, but not just that, how about being able to set button whenever action could be used, for instance, in user profile, in posts.. etc...?
I also would like to be able to set set description and keywords for HTML header for each custom action.
You will have to edit the template to make a button right now.
I'd like to know what context that code comes into when executed from a custom action...
My action with which I have issue is http://councilofelders.net/index.php?action=apply (http://councilofelders.net/index.php?action=apply), I have a check that you must register to test it, but basically it posts a form up, you fill in the inputs and click submit. The submit posts to http://councilofelders.net/index.php?action=apply2 (http://councilofelders.net/index.php?action=apply2)...another custom action. I used to run this piece as a straight php file but I thought I'd get jiggy and turn it into a custom action...as I straight php file on the diskdrive of the server I was golden...all worked well.
My code in action=apply2 takes the form inputs from action=apply and formats them into a forum post and manually updates the database posting as a dummy user. The idea here is to create posts in a board with very restricted visibility to a certain group of members on my site. So the Application user is the author of the post.
Now that I've made this action=apply2 I get the following error from my db update code:
Database Error
Table 'db180608952.messages' doesn't exist
File: /homepages/11/d1802342383/htdocs/hosts/councilofelders.net/www/Sources/Load.php(1708) : eval()'d code(9) : eval()'d code
Line: 102
The code for the first reference to the messages table is as follows:
// We've got the message, now post it and get its ID.
db_query("
INSERT INTO {$db_prefix}messages
(ID_BOARD, ID_MEMBER, subject, posterName, posterEmail, posterTime,
posterIP, smileysEnabled, body, icon)
VALUES ($board, $posterID, '$subject', '$posterName', '$posterEmail', " . time() . ",
'127.0.0.1', 0, '$message', 'xx')", __FILE__, __LINE__);
$ID_MSG = db_insert_id();
I'm requiring the inclusion of SSI.php and Subs-Post.php. I'm not really sure why sticking this into a custom action instead of a file would kill the script. Yes obviously I'm taking out the beginning and ending php tags that I'd have in normal php file.
Any thoughts?
First you *shouldn't* have to include SSI.php as everything from there is defined (except the functions in it). With the problem, have you included $db_prefix in your globals? At the top of the code, just add this line:
global $db_prefix;
hrrm judging by the error it would appear that I'm getting the db prefix correctly it matches the database name. I'll give it a shot and see what it does.
Thanks for the note.
EDIT: Bingo! TYVM!
Can you tell me what is wrong and/or how to fix these errors?
http://www.rebelrosenetworks.com/forum/index.php?action=mlist
8: Undefined variable: groupname
File: /public_html/forum/Themes/default/CustomAction.template.php (eval?)
Line: 59
http://www.rebelrosenetworks.com/forum/index.php?action=mlist
8: Undefined variable: groupname
File: /public_html/forum/Themes/default/CustomAction.template.php (eval?)
Line: 90
That's an error in the code you put in for the page. If you post the code I might be able to help.
Quote from: winrules on October 23, 2006, 04:01:47 PM
That's an error in the code you put in for the page. If you post the code I might be able to help.
The code for the mlist?
Yeah the mlist action.
Here it is
global $txt, $scripturl, $user_info;
global $context, $modSettings, $ID_MEMBER;
global $board_info, $settings, $db_prefix;
$groups_list = array(0, 20,14, );
echo '<table align="center" width="95%" cellpadding="0" cellspacing="0"><tr>
<td style="border-top: 2px solid #003366; border-bottom: 2px solid #003366; padding-top: 4px; "><center><h1>Meet All Our Members!!</h1></center></td></tr></table>';
foreach($groups_list as $groupnumber)
{
$loaded_ids = array();
$user_profile=array();
$memberContext=array();
$profile=array();
$context['TPortal']['team']=array();
// get the name of the group
$request = db_query("
SELECT groupName FROM {$db_prefix}membergroups WHERE ID_GROUP=$groupnumber", __FILE__, __LINE__);
if(mysql_num_rows($request)>0){
$row = mysql_fetch_row($request);
$groupname=$row[0];
mysql_free_result($request);
}
$select_columns = "
IFNULL(lo.logTime, 0) AS isOnline, IFNULL(a.ID_ATTACH, 0) AS ID_ATTACH, a.filename, a.attachmentType,
mem.personalText, mem.avatar, mem.ID_MEMBER, mem.memberName,
mem.realName,mem.lastLogin, mem.websiteTitle, mem.websiteUrl, mem.location,
mem.posts,
them.value AS teamtext";
$select_tables = "
LEFT JOIN {$db_prefix}log_online AS lo ON (lo.ID_MEMBER = mem.ID_MEMBER)
LEFT JOIN {$db_prefix}attachments AS a ON (a.ID_MEMBER = mem.ID_MEMBER)
LEFT JOIN {$db_prefix}themes AS them ON (mem.ID_MEMBER = them.ID_MEMBER AND them.variable = 'teamtext' AND them.ID_THEME=1)";
// Load the member's data.
$request = db_query("
SELECT$select_columns
FROM {$db_prefix}members AS mem$select_tables
WHERE mem.ID_GROUP = $groupnumber
ORDER BY mem.memberName ASC", __FILE__, __LINE__);
$new_loaded_ids = array();
while ($row = mysql_fetch_assoc($request))
{
$avatar_width = '';
$avatar_height = '';
$context['TPortal']['team'][] = array(
'username' => $row['memberName'],
'name' => $row['realName'],
'groupname' => $groupname,
'location' => $row['location'],
'href' => $scripturl . '?action=profile;u=' . $row['ID_MEMBER'],
'link' => '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '" title="' . $txt[92] . ' ' . $row['realName'] . '">' . $row['realName'] . '</a>',
'blurb' => $row['personalText'],
'avatar' => array(
'name' => $row['avatar'],
'image' => $row['avatar'] == '' ? ($row['ID_ATTACH'] > 0 ? '<img src="' . (empty($row['attachmentType']) ? $scripturl . '?action=dlattach;attach=' . $row['ID_ATTACH'] . ';type=avatar' : $modSettings['custom_avatar_url'] . '/' . $row['filename']) . '" alt="" class="avatar2" border="0" />' : '') : (stristr($row['avatar'], 'http://') ? '<img src="' . $row['avatar'] . '"' . $avatar_width . $avatar_height . ' alt="" class="avatar2" border="0" />' : '<img src="' . $modSettings['avatar_url'] . '/' . htmlspecialchars($row['avatar']) . '" alt="" class="avatar2" border="0" />'),
'href' => $row['avatar'] == '' ? ($row['ID_ATTACH'] > 0 ? (empty($row['attachmentType']) ? $scripturl . '?action=dlattach;attach=' . $row['ID_ATTACH'] . ';type=avatar' : $modSettings['custom_avatar_url'] . '/' . $row['filename']) : '') : (stristr($row['avatar'], 'http://') ? $row['avatar'] : $modSettings['avatar_url'] . '/' . $row['avatar']),
'url' => $row['avatar'] == '' ? '' : (stristr($row['avatar'], 'http://') ? $row['avatar'] : $modSettings['avatar_url'] . '/' . $row['avatar'])
),
'website' => array(
'title' => $row['websiteTitle'],
'url' => $row['websiteUrl']),
'online' => array(
'is_online' => $row['isOnline'],
'text' => &$txt[$row['isOnline'] ? 'online2' : 'online3'],
'image_href' => $settings['images_url'] . '/' . ($row['isOnline'] ? 'useron' : 'useroff') . '.gif',
),
'teamtext' => $row['teamtext'],
);
}
mysql_free_result($request);
echo '<table align="center" width="90%" cellpadding="0" cellspacing="0"><tr>
<td colspan="4" style="border-top: 2px solid #003366; padding-top: 4px; "><h4>' . $groupname . '</h4>
</td></tr><tr><td colspan="4"></td></tr><tr>';
$newrow=0;
foreach($context['TPortal']['team'] as $team)
{
echo '
<td valign="top">'.$team['avatar']['image'].'</td>
<td valign="top" width="50%" class="middletext" style="padding: 2px;">
<h4 style="margin-top: 0; margin-top: 2px;">'.$team['link'].'</h4>
' , !empty($team['location']) ? '<b>Location</b>: '.$team['location'].'<br />' : '' , '
' , !empty($team['website']['title']) ? '<b>Website</b>: <a href="'.$team['website']['url'].'" target="_blank">'.$team['website']['title'].'</a><br />' : '' , '
' , $team['online']['is_online'] ? '<img src="'.$team['online']['image_href'].'" alt="" /> '.$team['online']['text'].'<br />' : $team['online']['text'].'<br />' , '
' , !empty($team['blurb']) ? '<i>- '.$team['blurb'].'</i><br />' : '' , '
' , !empty($team['teamtext']) ? $team['teamtext'].'<br />' : '' , '
</div></td>';
$newrow++;
if($newrow>1){
$newrow=0;
echo '</tr><tr><td colspan="4"></td></tr><tr>';
}
}
echo '</tr></table>';
}
Try this:
if(mysql_num_rows($request)>0){
$row = mysql_fetch_row($request);
$groupname=$row[0];
mysql_free_result($request);
}
else
$groupname = '';
Instead of
if(mysql_num_rows($request)>0){
$row = mysql_fetch_row($request);
$groupname=$row[0];
mysql_free_result($request);
}
ok great thanks, I will go try it and if it stops the errors I want to say thank you now and if not I will be back.
Thanks
Parse error: syntax error, unexpected '}' in /public_html/forum/Sources/Load.php(1711) : eval()'d code(9) : eval()'d code on line 120
Try this:
if(mysql_num_rows($request)>0){
$row = mysql_fetch_row($request);
$groupname=$row[0];
mysql_free_result($request);
}
else {
$groupname = '';
}
Thank you LeGaS, that worked and so far no errors!!!
Great Mod winrules thanks I use it a lot :) Now for the question! can I make a custom action use specific theme i.e if my board is set to use the "SMF Default Theme" can I make the mod use "Babylon Theme" instead, so that when I have made an action and I link to it that link goes to the "Babylon Theme" with that page.
Hope this makes sense ???
Thanks Les
Umm I don't think there's a way to that right now sorry.
ok winrules thanks, its just that I have a shop on my site and I have it in a article (TinyPortal), so if people are viewing that page I cant see what they are doing in who's online
Les
Winrules where does the Custom Action data get stored? Couldn't find a heading for it it in the database, or anywhere else I looked.
I use Custom Action all the time, it's great!
It's in the settings table.
real fast: I see the php code to make sure the visitor is not a guest, but what would be the php code to limit the action to a specific membergroup?
or better yet, specific membergroups, like Groups A & B can't access, but Groups C, D, F, but not E can.
:)
thanx
-markd
if (!in_array(array(1, 2, 3), $user_info['groups']) || in_array(array(4, 5, 5), $user_info['groups']))
fatal_error('You are not allowed to access this section.', false);
That would only allow the user to access the page if they are in group 1, 2, or 3, and not in groups 4, 5, or 6. Note that those are groups IDs, not names, and $user_info has to be in the global list.
Would it be possible to make it so the forum menu bar at the top is not displayed on the custom pages?
Quote from: Isaac on November 22, 2006, 09:42:37 PM
Would it be possible to make it so the forum menu bar at the top is not displayed on the custom pages?
Do you mean the whole header and footer or just the list of buttons at the top?
Quote from: winrules on November 22, 2006, 10:54:20 PM
Quote from: Isaac on November 22, 2006, 09:42:37 PM
Would it be possible to make it so the forum menu bar at the top is not displayed on the custom pages?
Do you mean the whole header and footer or just the list of buttons at the top?
Just the list of buttons at the top, like [Home] [Search], etc.
Hmm...that's a hard one. I guess you could do something like edit index.template.php. Find:
template_menu();
Replace With:
if (!in_array( $context['current_action'], array('myaction')))
template_menu();
Just replace 'myaction' with the name of your action. If you have more than one action you can put 'myaction', 'myaction2', 'ect'.
Works perfectly. Thanks for the quick response, I really appreciate it.
Can you please get this to work on SMF 1.1?
Yhea.. This is a really useful mod...
Come on winrules update it :D
I need an updated version of this Mod or over half of my sitenavigation block that i made for TINY PORTAL is useless. When is the 1.1final compatible version out ? :-[
If you unzip the Custom Action Mod on your local machine, open package-info.xml.
then find both instances of 1.1 RC3 and change to 1.1 save and close
zip it all up your done, tried in my site works fine.
Hope you don't mind winrules :)
I got it installed that way, but I don´t find the custom action in the admin where it was before.
It was in Features an Options, and now it isn´t. Thought the mod appeared to be installed fine. :( What now ?
did you install with the default theme?
Now I get:
Quote
You cannot download or install new packages because the Packages directory or one of the files in it are not writable!
when I try to install it new. Though all files in that folder are 777, I can´t really make them more writable. :(
Version 2.04 adds 1.1 Final compatibillity.
Have you given any more thought to expanding the code entry textarea?
Quote from: rant-zone on December 14, 2006, 09:24:06 PM
Have you given any more thought to expanding the code entry textarea?
That would require modifing a lot of other things, which I'd rather not do. You can just make the code in another editor, and then paste it into the box.
Thanks for the reply winrules,
That's what I've been doing, but I don't have apache, and php, and MySql running at home and to test a small modification requires re-uploading the new piece of code to my server. All in all three programs running to add a period at the end of a sentence is a bit of a pain, but not as much of a pain as trying to track down the end of a sentence in a tiny window. All in all a great mod. I wish I knew php, or whatever it is you code these mods in, this would totally rock with a few accessories added in. Like a couple of checkboxes to add a chunk of code (like the peice earlier in this thread to remove buttons. One for the whole header would be good too) , to the file you were creating. Anyway keep the great mods coming.
RZ
Are you going to update this for 1.1.1 compatibility ?
I, and im sure others would like it if you did.
The package for 1.1 works with 1.1.1 on my board.
I get this error with 1.1.1
Fatal error: Call to undefined function: customactionsettings() in public_html/forum/Sources/ModSettings.php on line 341
in these lines is this:
function ModifyActionSettings()
{
global $sourcedir;
require_once($sourcedir . '/CustomAction.php');
CustomActionSettings();
}
any ideas?
Can you reupload CustomAction.php in the mod package to the Sources directory? It looks like it didn't get uploaded correctly.
I'm using 1.1.1 and my forum's package manager won't even let me download it (claims it's either corrupt or incompatible), any idea why?
Where are you downloading it from?
From the mods section of this site.
when i make a php page with just:
Test
PHP
Test
Test
and i get the following error: Parse error: syntax error, unexpected $end in /home/user/public_html/smf/Sources/Load.php(1724) : eval()'d code(9) : eval()'d code on line 1
then i tried:
Test
PhP
Test
^leaving the content/code box emtpy and i get no errors but when i add any text, code or anything in there i get errors
clevername - Can you try unzipping it locally and see if you get any errors? It might just be a corrupt download.
nyxtyr - That's not valid PHP code. If you don't know PHP you will have to just use the HTML or BBC page types.
Okay, I tried that. No errors. I'm totally stumped. :/
Can you try redownloading th epackage?
Okay, I tried that, and it's still telling me it's corrupted or incompatible.
I installed this mod. There were no errors. Now when I go to Featuers and Options I get this error
Fatal error: Cannot redeclare modifyactionsettings() (previously declared in forum/Sources/ModSettings.php:356) in
forum/Sources/ModSettings.php on line 362
I uninstalled the mod but still get the error.
Forum version: SMF 1.1.1
Mod Name Version
1. SMF Arcade 1.3.0 [ Uninstall ] [ List Files ] [ Delete ]
2. TinyPortal 0.97 [ List Files ] [ Delete ]
3. SMF Links 1.6.3 [ Uninstall ] [ List Files ] [ Delete ]
4. Googlebot & Spiders Mod 2.0.2 [ Uninstall ] [ List Files ] [ Delete ]
5. SMF Achat ALPHA 0.2.0 [ Uninstall ] [ List Files ] [ Delete ]
6. SMF 1.1.1 Update Package 1.1.1 [ Uninstall ] [ List Files ] [ Delete ]
7. Users Online Today Mod 1.4.0 [ Uninstall ] [ List Files ] [ Delete ]
8. SMF Gallery Lite 1.7.1 [ Uninstall ] [ List Files ] [ Delete ]
9. SMF Archive 1.1 [ List Files ] [ Delete ]
10. Custom Action Mod 2.04 [ Apply Mod ] [ List Files ] [ Delete ]
Any help apreciated
nevermind I fixed it. Script hung and repeated mod 6 times
Quote from: clevername on January 14, 2007, 02:08:38 AM
Okay, I tried that, and it's still telling me it's corrupted or incompatible.
Odd, did you by any chance remove the version number from the Powered By line of your forum? Do you have problems with other packages?
QuoteOdd, did you by any chance remove the version number from the Powered By line of your forum?
Nope its always been there. http://www.friendlyjungle.com/forum/
QuoteDo you have problems with other packages?
Nope I have several others installed and they worked like a champ.
I wrote a custom mod for Member Pages but it does not touch any of the same files.
Thanks for answering but again I corrected the error and all is well now.
Works for me! Thanks very much, nice addition to the infrastructure. After some tweaking I was able to execute ad hoc inline sql queries and output the result sets within the smf framework. We're using joomla and orstio's bridge BTW
SMF 1.1.1
Mods:
1. EmailFlash 2.0 [ Uninstall ] [ List Files ] [ Delete ]
2. FlashChat Integration 0.1 Beta [ Uninstall ] [ List Files ] [ Delete ]
3. Custom Action Mod 2.04 [ Uninstall ] [ List Files ] [ Delete ]
4. Spell Check Custom Words 1.0.1 [ Uninstall ] [ List Files ] [ Delete ]
5. Googlebot & Spiders Mod 2.0.2 [ Uninstall ] [ List Files ] [ Delete ]
6. Global Announcements 1.0 [ Uninstall ] [ List Files ] [ Delete ]
7. FontandSizeDropdown1.1 1.1 [ Uninstall ] [ List Files ] [ Delete ]
Got a weird thing I just noticed.
No errors in any error log, forum or server.
I created a custom action, using the mod, to a plain jane html page full of links, and I created a new tab for the default theme, called "Links", which works like it's suppose to.
Everything works fine, except, when I click on the "Profile" tab (none of the others do this), the text in the "Links" tab changes to say "Reset Form". ???
The tab stays clickable, and takes you to the proper page.
Any ideas whare that comes from?
Ideas on my previous post?
Anybody?
Bueller? :P
Hello! Great mod. But I have a problem.
I was recommended to use this mod to show all my members awards on one page.
I'm confused on how I would do this... could anyone help me?
I want to show "Awards" in the main menu...and I would like that "awards" page to show all the members that recieved awards for the month... could anyone help me out? I'm so lost.
Thank u.
OK. I've obviously made a complete hash of this.
I wanted to make a single button to access the theme-changer page.
I created an action and called it "ThemeChanger". Original, huh?
I made the "Type" php.
I made the page title "ThemeChanger". I'm high on originality, as you can tell.
In the "Code" box, I added:
http://www.tlakoc.org.uk/index.php?action=ThemeChanger
Thing is, I'm getting "Parse error: syntax error, unexpected ':' in /home/tlakoco/public_html/Sources/Load.php(1724) : eval()'d code(9) : eval()'d code on line 1"
I'm confused, as you might imagine...
Can anyone give me an example of how to access a custom profile field from inside a custom action ?? 8)
I figured it out...
global $sourcedir;
$p_id=$_GET['u'];
require($sourcedir . '/Profile.php');
loadThemeOptions($p_id);
echo "CP1 = " . $context['member']['options']['CP1'];
I just installed this mod on SMF 1.1.2 but it shows the error below when I click on Features and Options in admin.
Fatal error: Cannot redeclare modifyactionsettings() (previously declared in /home/leica/public_html/Sources/ModSettings.php:345) in /home/leica/public_html/Sources/ModSettings.php on line 351
Any idea why?
Quote from: khoking on February 28, 2007, 02:13:01 AM
I just installed this mod on SMF 1.1.2 but it shows the error below when I click on Features and Options in admin.
Fatal error: Cannot redeclare modifyactionsettings() (previously declared in /home/leica/public_html/Sources/ModSettings.php:345) in /home/leica/public_html/Sources/ModSettings.php on line 351
Any idea why?
Cannot redeclare often means that a code is doubled. Check the files if there is some of the code double added.
Thanks! Corrected :)
I just wanted to say that this is a GREAt mod winrules. Thanks so much for doing this for us! This really adds a lot more flexibility to the forum and I really appreciate it. :thumbsup:
Quote from: winrules on May 20, 2006, 05:49:18 PM
Quote from: uberjon on May 20, 2006, 04:59:16 PM
seems i found a small bug in the action mod :;(
when i try to copy alot of html into the box it does it just fine but when i save it it deletes the last part to make it all fit or somethig :S
just ignore the content in this just to show u how long it is :P
er... nvm wont let me post QuoteThe following error or errors occurred while posting this message:
The message exceeds the maximum allowed length (65530 characters).
it works well in a program i am using to help me with the html.. but it deletes part of it when i try to use it :'(
can u fix this?
It's not a bug, it's that the database column is a TEXT column, which limits the data to 65535 characters. If you want to use this mod with a something longer than that, you will have to set the "value" column in the settings table to MEDIUMTEXT or LONGTEXT.
Hello and thank you for your great work with this mod.
I'm fairly new to all this so I don't understand how to implement your above suggestion. I am also running into the text limit issue. Could you please explain to me what exactly I need to do to apply your quote above and what files and code to look for that need to be changed?
Thanks
I thought this'd be useful to make a single, one-click link to the theme change page.
I've tried putting:
http://www.tlakoc.org.uk/index.php?action=theme;sa=pick;u=1;sesc=8fa8a3d0734ebbfc98f1e4cd8f195874
in the "Code" box. That's obviously stoopid, though, because of sessions and things.
Anyone know what I SHOULD be putting in there, please?
You can use .../index.php?action=profile;sa=theme
.
I'll give it a try.
Thanks!
Oh, dear.
That gives me:
Parse error: syntax error, unexpected ':' in /home/tlakoco/public_html/Sources/Load.php(1734) : eval()'d code(9) : eval()'d code on line 1
THAT, I didn't expect...
What have you added exactly?
Just what you typed.
I tried it with "sa=theme" as a sub-action, too.
Got the same error.
Quote from: kat on March 24, 2007, 05:12:39 PM
Just what you typed.
I tried it with "sa=theme" as a sub-action, too.
Got the same error.
With the ...? Or did you change it to your board address?
Sorry...
Yeah. My board's address, naturally. Odd that the error's coming from load.php, innit?
I don't know. Check you own profile at your board and copy the link under "Design & Layout" or similar. Have German activated here. This is the link you should use.
This one?
http://www.tlakoc.org.uk/index.php?action=theme;sa=pick;u=1;sesc=78abb52ab60b3ca3fec7d89a2a8ba3b4
That gives me "Session timed out" errors, because of the session ID.
Quote from: kat on March 26, 2007, 05:11:35 AM
This one?
http://www.tlakoc.org.uk/index.php?action=theme;sa=pick;u=1;sesc=78abb52ab60b3ca3fec7d89a2a8ba3b4
That gives me "Session timed out" errors, because of the session ID.
No! That one. Take a look at the picture.
With you!
I'm getting that load.php error, with that.
Parse error: syntax error, unexpected ':' in /home/tlakoco/public_html/Sources/Load.php(1734) : eval()'d code(9) : eval()'d code on line 1
which I find rather peculiar, to be honest.
How do you include it at Custom Action Mod?
Name: ThemeChanger
Type: php
Page Title: ThemeChanger
Code: http://www.tlakoc.org.uk/index.php?action=profile;u=1;sa=theme
Quote from: kat on March 27, 2007, 10:27:11 AM
Code: http://www.tlakoc.org.uk/index.php?action=profile;u=1;sa=theme
Yes, ofcourse it makes an error. There is the user defined. Change the link to
http://www.tlakoc.org.uk/index.php?action=profile;sa=theme
I'd thought it was down to that. Session ID causing the problems, I suspect.
Problem is, I'm still getting:
Parse error: syntax error, unexpected ':' in /home/tlakoco/public_html/Sources/Load.php(1734) : eval()'d code(9) : eval()'d code on line 1
Which I find most odd.
Did you already include links through custom action mod?
If I make a clickable link, in the way you described, it works, fine.
For some odd reason, though, using exactly the same link, as a "Custom action" gives that error.
Most odd, huh?
I am not familiar with the code of the Custom Action Mod, but I think that it is caused by it. Maybe if you make a php code frame around the link. I think the : from http:// causes the error.
I'm extremely grateful for the help you've given me, Kettu.
I'll give it a go and let you know how it goes.
Quote from: kat on February 11, 2007, 10:32:13 AM
I made the "Type" php.
I made the page title "ThemeChanger". I'm high on originality, as you can tell.
In the "Code" box, I added:
http://www.tlakoc.org.uk/index.php?action=ThemeChanger
echo 'http://www.tlakoc.org.uk/index.php?action=ThemeChanger';
suggest u use bbc instead of php
[url]http://www.tlakoc.org.uk/index.php?action=ThemeChanger[/url]
Great mod ;)
I'm using it with the SSI Single Message mod (http://custom.simplemachines.org/mods/index.php?mod=357) cos' it's easier to work on an editor :) With little changes to how the grabbed message is to be displayed, custom mod helps me to show whatever content I have on one of my forum post. The 2 worked really great for me.
One question, or rather, a suggestion.. To add treelink so that the custom page can look uniform. Forum Name > Custom Page Title.
Cheers!
Great mod, but I'm stuck on one part. Could someone help me attach an RSS feed to the custom action page so it displays content? I've tried doing stuff like this before without the custom action page (I normally use a PHP include), but when I put the code on a custom action page, I get this error:
Quote
Parse error: syntax error, unexpected '<' in /home/nerdcoun/public_html/forum/Sources/Load.php(1726) : eval()'d code(9) : eval()'d code on line 1
If it helps, I'm using this feed: http://nerdcouncil.com/blog/?feed=rss2
Thanks!
is it possible to use a frame on a custom action page to access an outside php script so it would run the entire script inside a frame on the 1 custom page? something like
<frameset rows="*,*"" frameborder="NO" border="1" framespacing="0">
<frame src="http://mysite.com/index.php" name="mainFrame">
</frameset>
Maybe use the PHP option then use PHP include
well it kinda worked ... it showed the page .. but the php generated links took me back to the main page of the site
any other ideas?
Quote from: htmlmaster on April 10, 2007, 04:46:10 PM
Great mod, but I'm stuck on one part. Could someone help me attach an RSS feed to the custom action page so it displays content? I've tried doing stuff like this before without the custom action page (I normally use a PHP include), but when I put the code on a custom action page, I get this error:
Quote
Parse error: syntax error, unexpected '<' in /home/nerdcoun/public_html/forum/Sources/Load.php(1726) : eval()'d code(9) : eval()'d code on line 1
If it helps, I'm using this feed: http://nerdcouncil.com/blog/?feed=rss2
Thanks!
maybe you could post your code here so that we can take a look..
Quote from: Darkorical on April 11, 2007, 03:08:38 AM
well it kinda worked ... it showed the page .. but the php generated links took me back to the main page of the site
any other ideas?
I've tried with an iframe and have no problem. Same thing, what code did u use?
Memo to self Don't Code at 2 am.
Where <frameset> and <frame src> failed Iframe worked beautifully. Thank you
Here's all I have:
<?php include("http://www.nerdcouncil.com/testrss.php"); ?>
[/quote]
And I put that right on the custom action page code area, it's on PHP too.
htmlmaster,
You don't have to put the php tags, just use
include("http://www.nerdcouncil.com/testrss.php");
or put the (testrss.php) php code into the custom page code box directly (without <?php & ?>).
Yay! it worked! Thank you so much!
I have been thinking about how to use the Custom Action Mod to create a simple blog using SSI. My thought is to create something that has 2 parts; a blog list and actually showing the blog. My concept is to make a Blog Board, and make it so Regular Members can post topics, but only reply to their own topic.
OK.... The 1st part, making the blog list, is pretty straight forward by modifying the ssi_boardNews. I am thinking I could call the modified ssi as: ssi_blogList. Then the 1st Custom Action would be:
<div>ssi_blogList();</div>
This could be the link to a Blog button on the template menu.
I am thinking the 2nd Custom Action could be a slightly modified version of ssi_topics or ssi_topicNews.
2nd Custom Action:
<div>ssi_singleBlog($ID_TOPIC); <---- $ID_TOPIC from the previous Custom Action created link
Question #1. For the URL from the Blog List created by the 1st Custom Action, how can I get it to go to the specific ID_TOPIC for the ssi_topics/ssi_topicNews so it shows up in the 2nd Custom Action?
In other words, I know I can put: ?action=singleBlog (if that is the name of the 2nd Custom Action), but how do I code it to do that? maybe: ?action=singleBlog;sa=555 where 555 = the topic ID from the link created in the Blog List?
Question #2. Will the contents displayed by the Custom Action follow the style.css?
In other words, if I placed additional items in the stylesheet for example in a "div":
#blog {border: 10px ridge navy; margin:10px; padding:10px 100px 10px 100px}
Will the contents accept and display this?
<div id="blog"> allll blog content </div>
thanks in advance....
I think I answered Question #2. It should work just fine using the theme's style.css.
soooo, back to Question #1.....
Can I take something like this from the New Comment of the Topics-Replies mod:
'new_comment' => '<a href="' . $scripturl . '?action=post;topic=' . $row['ID_TOPIC'] . '.' . $row['numReplies'] . '">' . $txt['smf_news_3'] . '</a>',
and replace:
?action=post;topic=
with something like this?:
?action=singleBlog;topic=
Would the Topic ID variable be transferred to the ssi_singleBlog(); in the 2nd Custom Action or Sub Action?
thanks....
....just did some rough testing and what I proposed above works!!! woohoo!
one interesting thing was I had to require SSI.php to use the ssi_boardNews, for example.
At least it is able to use style.css
Nice work on the Mod!
Hi, can someone tell me how to get frames to work in this?
I added this to the field:
Quote<html>
<head>
</head>
<frameset rows="10%,*" border="0">
<frame name="title" src="title.html">
<frameset cols="40%,*" border="0">
<frame name="menu" src="menu.html">
<frame name="content" src="content.html">
</frameset>
</frameset>
<body>
</body>
</html>
And created the title.html, menu.html and content.html files and put them in the correct place, But after I save the action and view the page, it didn't output anything..
Any ideas?
Anyone? :-\
did you try it without the html, head, and body tags?
Yes I did, same result... :(
<center><iframe
src ="http://link to the page you want to display"
width="90%" height="500" scrolling="no">
</iframe></center>
YOu can do it this way. Just edit the above code to your liking
Thanks, but that doesn't work for what I need to do.
I need a 3 part layout, like the frame code in my other post indicated.
Not just one page displayed. 3 files make up this page. the code I used works,(as you can see from the pic) I just can't get it to work for custom action mod. :-\
Pic of how it should look is attatched.
Save your code as your_file_name.html
<html>
<head>
</head>
<frameset rows="10%,*" border="0">
<frame name="title" src="title.html">
<frameset cols="40%,*" border="0">
<frame name="menu" src="menu.html">
<frame name="content" src="content.html">
</frameset>
</frameset>
<body>
</body>
</html>
create a html custom page and point tick's code to your_file_name.html
<center><iframe
src ="you_file_name.html"
width="90%" height="500" scrolling="no">
</iframe></center>
place all the html files to the base directory where smf resides or point to the full url of the files.
I have been looking/testing and I think I see some of your problem here...... SMF does not like the html tags of frameset and frame. I think it is because of XHTML Strict DTD does not allow them.
Here is a work around and could give you something nearly as good using the "iframe" tag.
If your desired end result is to have the SMF header and footer display with your code in the middle, then this is a way to do it. One advantage of this method is that you can get around that darn small textarea input box in Custom Actions Mod. :)
Overview: We will create a new template file and place it in the Themes/default directory. Name it whatever..... for example: yourcodename.template.php Then we will create a Custom Action which calls to load that specific template.....; <----- very little coding there. :)
OK... Let's do it! (using your html filenames...)
Create the template file:
<?php
echo 'Hey! This is Your Template! <br /><br />';
echo '<div>';
include ('title.html');
echo '</div><div>';
echo '<iframe width="100%" height="500px" src="content.html"></iframe></div>';
?>
Save that file as: yourfilenamehere.template.php
Upload that file to the Theme/default directory.
In Custom Acitons put:
loadTemplate('yourfilenamehere');
Make sure you save the Custom Action as a PHP file.
****NOTE: only put the template name here. leave off the .template.php
One thing you would have to do different is to place the menu.html file at the top of your content.html file if you are wanting other pages to load within the iframe.
Using the Custom Actions Mod this way, by creating template files to display the desired Contents seems to be a nice way of enhancing a site.
Quote from: iwyen on April 24, 2007, 10:12:30 AM
Save your code as your_file_name.html
<html>
<head>
</head>
<frameset rows="10%,*" border="0">
<frame name="title" src="title.html">
<frameset cols="40%,*" border="0">
<frame name="menu" src="menu.html">
<frame name="content" src="content.html">
</frameset>
</frameset>
<body>
</body>
</html>
create a html custom page and point tick's code to your_file_name.html
<center><iframe
src ="you_file_name.html"
width="90%" height="500" scrolling="no">
</iframe></center>
place all the html files to the base directory where smf resides or point to the full url of the files.
That worked like a charm, thanks!
@Spottedhog- Thanks for the suggestion, I like that idea and might just do that for some other pages that I'll be making, thanks!
what directory does this mod need installed into, I installed it and get an error page when I try to link to it.
Quote from: breezie on April 27, 2007, 06:05:45 AM
what directory does this mod need installed into, I installed it and get an error page when I try to link to it.
Please read http://docs.simplemachines.org/index.php?board=49.0;sort=subject (http://docs.simplemachines.org/index.php?board=49.0;sort=subject)
can anyone help me... im looking for a code to check if your a guest?
then returns echo '<font size=36 color=#ffffff>YOU NEED TO LOGIN BEFOR YOU SEE THE PAGE!!!</font>;
Sounds like a feature for the mod :)
if ($context['user']['is_guest'])
echo 'bla bla';
else
echo 'bla bla bla';
I get also an error - installed via PackageManager. "Cannot install mod..." SMF, Ver. 1.1.2. Can anyone give a hint!?
Okay for some reason I'm getting text that says Custom Action when I go to my Features and Options... but I don't even have that mod installed =( how can I get rid of this link?
Hi,
could someone help mw with this problem?
[url][http://www.simplemachines.org/community/index.php?topic=161925.0/url]
Thanks :)
Quote from: Sharr76 on June 05, 2007, 06:34:21 AM
Hi,
could someone help mw with this problem?
http://www.simplemachines.org/community/index.php?topic=161925.0 (http://www.simplemachines.org/community/index.php?topic=161925.0)
Thanks :)
What is the HTML code you added?
iwyen
I installed this mod:
http://custom.simplemachines.org/mods/index.php?mod=331 (http://custom.simplemachines.org/mods/index.php?mod=331)
I know this installed on 1.1.3, but I didn't see any place to input my values..
1.1.3 ... ;D
Maybe you should rename this mod to 'Custom Pages'. Its really not given credit for how useful it is. Just my opinion.
I agree... this is a GREAT mod.
Should really be integrated with SMF... why not? This mod applies to everyone, it doesn't use extra resources.
hey, i installed the mod it was all successful but nothing shows up in 'features and options'...
I've really been wanting to make more actions, and this mod really helped ^_^
One problem: I have links to all the sub-actions in the main actions, and when I click them, it says in the top URL of the web page that it went to the sub-action, but the page didn't change like it's supposed to. Anyone know how to fix this?
((click here (http://dollcon.troublebubble.org/index.php?action=link) and click one of the things under Navigation if you have no idea what I'm talking about))
Quote from: John S on August 09, 2007, 01:55:35 AM
hey, i installed the mod it was all successful but nothing shows up in 'features and options'...
perhaps i should uninstall and reinstall it?
i get this error:
Type Action Description
1. Delete File ./Sources/CustomAction.php
2. Delete File ./Themes/default/CustomAction.template.php
3. Execute Modification ./Sources/ModSettings.php Test failed
4. Execute Modification ./index.php Test failed
why does the test fail?
i tried to do a package parser on this mod and it doesnt work.. hmm.. how do i know if everything that's supposed to be in the 'features and options' area installed?
Well, I'm certainly not an expert on this stuff, but I can attempt to help you by saying...
Usually when tests fail (at least for me), it's because the mod does not work on the version of SMF that you have. Not entirely sure if that's your problem, though...
when i try to put php code page like a custm action i got this error
QuoteParse error: parse error, unexpected '<' in c:\program files\easyphp1-7\www\novo\Sources\Load.php(1735) : eval()'d code(9) : eval()'d code on line 1
I'm using a php 301 redirect for my custom action... and it works...
header("HTTP/1.1 301 Moved Permanently");
header("Location: http://www.newdomain.com/newpage/newurl.htm");
exit();
Now, my question is regarding the SSI action that creates the menu bar.
<?php ssi_menubar(); ?>
In index.template.php, I have created an additional link for this custom action. Say, for example that the custom action is titled "mall".
// Show the [mall] button.
echo ($current_action=='mall' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'mall' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '">Mall</a>
</td>' , $current_action == 'mall' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
Now when someone visits the "mall" I would like the "Mall Button" in the menubar to indicate that they are indeed in the mall.
Is there anything I'm missing in index.template.php that would prevent the change in the background for the active mall tab?
Thanks.
Quote from: Farmacija on August 14, 2007, 09:14:00 AM
when i try to put php code page like a custm action i got this error
QuoteParse error: parse error, unexpected '<' in c:\program files\easyphp1-7\www\novo\Sources\Load.php(1735) : eval()'d code(9) : eval()'d code on line 1
Make sure when you enter the php code you remove the php tags. they are added automatically for you.
yes i figure it. :)
for other members-there isn't need to put <?php for the start of php file in custom action field :)
I need to align something to the center of the page on a php page but it gives this error:
Parse error: syntax error, unexpected '<' in /home/sk8erdud/public_html/da/Sources/Load.php(1726) : eval()'d code(9) : eval()'d code on line 1
Ok, php/smf newbie with a question....
I'd like to create BBC tag(s) that will access the public mimetex server....let's call the tags [math] & [/math]....
[math] ~LaTex code~ [/math]
will get automagically translated into
[ img ] http://www.url.com/mimetex.cgi?~LaTeX code~ [ /img ]
I'm not sure how to fill in the fields to create this kind of action. Any help is appreciated.
Thanks!
Chris
Just wondering...
To what kind of "actions" do you usually use this MOD for? Just trying to realise the potential and gather some fresh and interesting ideas to develop. ;D
Quote from: Monniemoo on August 13, 2007, 02:12:40 PM
I've really been wanting to make more actions, and this mod really helped ^_^
One problem: I have links to all the sub-actions in the main actions, and when I click them, it says in the top URL of the web page that it went to the sub-action, but the page didn't change like it's supposed to. Anyone know how to fix this?
((click here (http://dollcon.troublebubble.org/index.php?action=link) and click one of the things under Navigation if you have no idea what I'm talking about))
Really, I need this ASAP. I have a credits link page in this, and until I solve this problem I'm technically not giving all needed credit. (still giving SMF credit, but not other credit)
It's ";sa=" not ";do=".
hi, i got a center block (using tinyportal) that redirects to my custom action under certain circumstances (user is logged in and a custom profile field is not set when visiting the forum index).
Im using redirectexit($scripturl.'/index.php?action=myaction'); to redirect.
When i visit my action by directly accessing the url it works like a charm, however when the user is redirected by the center block code the user is not logged in anymore when reaching my action.
Heres my center block code:
<-snip->
problem solved: dont use full url in redirectexit() just redirectexit('action=myaction')
Hi @ all,
first : its a great mod ;)
I want to integrate a foreign script, its a small link directory. I'd did it before using the custom action mod by making the changes by hand (index.php). But i got some ugly errors ;) So i decided to try it with the custom action mod. I copied the script named xlinks into the boarddir and created a new action with on line of php in it.
require ('xlinks/index.php');
i also tried it with include() but if i try to open the custom page there are serval errors. I think because of the include path but im unable to fix this. If i run the script by opening it directly in the browser, there are no errors.
The error is this one :
Quote
Fatal error: require() [function.require]: Failed opening required './config.php' (include_path='.;\xampp\php\pear\') in E:\xampp\htdocs\smf\xlinks\include\head.php on line 59
Line 59 of head.php is :
require('./config.php');
I also tried to change the path to ./xlinks/config.php and i got the same error on another line number. After a changed all includes() or require() paths i will get a blank site with no errors. What im gonna do now ??
I have read through the 13 pages of this thread.........
I am also a newbie at this. My question is how do I install the mod?
I have index.php action array with 'customaction' => array('CustomAction.php', 'CustomAction'),
I have put CustomAction.php into Sources
I have put customaction.template.php into Themes/default
What do I do with modification.xml, movemodsettings.xml and package-info.xml?
how to make custom action
Ok i solved the problem by using an iframe with no borders, so im able to display the forum header and the other script below the menu.
I have Google Adsense search on my smf forum.
I created a page through 'Action Mod':
http://www.mysite.com/index.php?google
I've followed the wizard from Google Adsense.
I get this code, which i inserted into action mod page HTML:
Code:
<!-- Google Search Result Snippet Begins -->
<div id="googleSearchUnitIframe"></div>
<script type="text/javascript">
var googleSearchIframeName = 'googleSearchUnitIframe';
var googleSearchFrameWidth = 700;
var googleSearchFrameborder = 0 ;
var googleSearchDomain = 'www.google.com.au';
</script>
<script type="text/javascript"
src="http://www.google.com/afsonline/show_afs_search.js">
</script>
<!-- Google Search Result Snippet Ends -->
When I try the Google Search function It doesn't work it redirects me to the same page?
Fatal error: Cannot redeclare template_main() (previously declared in C:\Documents and Settings\dark\Bureaublad\Nieuwe map (2)\Sources\Load.php(1726) : eval()'d code:7) in C:\Documents and Settings\dark\Bureaublad\Nieuwe map (2)\Sources\Load.php(1726) : eval()'d code(9) : eval()'d code on line 417
I get this when I place a code in it (it is nou running on a server on my pc (wampserver)
Could you help me?
Does this work with 1.1.4?
I'm trying to create a "portal" type page. I'm using HTML for the layout and SSI PHP for stuff like "Recent Post". My question is there way to use HTML and PHP to create a custom action?
Does this work for version 1.1.4?
Yeah it does ;) works fine in my forum
http://www.marook-online.de/smf/index.php?action=xlinks
for example...
Can I give permission to certain users/groups to use this, or is it only for administrators?
If I make an action using PHP, what do I need to do to get mysql-queries to work?
No you can't give permissions, but can verify the membergroup in your custom action code... you can use db_query() to do sql queries, pls refer to the online documentation.
Yes I realized that I can perform mysql-queries just as normal. Although, it behaves a little wierd, it does work. How about getting parameters, there's no convenience-array I could use, I will have to parse the request directly, right?
Oh, regarding the mysql-queries. I now initialize a new connection. I copied that part directly from the SSI.php. But is this necessary? Initializing a conn requires me to put usernams and passwords in my custom action, which is not nice.
No you dont need to initialize a new connection, just do the queries... just take a look at the docs (http://docs.simplemachines.org/)
Well... really, finding out what I can and cannot do with Custom Actions is not really revealed in the docs. What you are trying to say is, it is business as usual, right? I can call any functions declared in subs (as long as they subs are included that is), do any sql:ing, and so forth.
Yepp ;) Maybe sometimes you must use global [$varname] to get access to different vars... for example, i used the $language variable, which is stored in $_SESSION['language'] to display different parts of my custom actions in the same language, the user or guest has choosed... Its also possible to display the linktree above your custom action... SMF is great !!!
Hi,
Please could someone give me some guidance on how to do the below code with a db_query() ??
Many Thanks,
ibizara
<?php
require_once('SSI.php');
$allowed_groups = array(1, 9);
$can_see = FALSE;
foreach ($allowed_groups as $allowed)
if (in_array($allowed, $user_info['groups'])){
$can_see = TRUE;
break;
}
if ($can_see){
echo ('access granted');
}
else{
echo ('access denied');
}
?>
I want to create a php action
if user is logged in
then show his own post
how to write the code I dont know wot code is needed to get this action
hmm, I don't think you can set permissions with this mod - unfortunately! ;)
ok
as we have the mod we want some php snippets to use
so can anyone create some snippets or ideas to be used in this mod.
Using the customaction mod, is there a way to do this?
<a href="', $scripturl, '?action=profile;u=', $ID_MEMBER, ';sa=showPosts"><img border="0" src="',$settings['images_url'],'/usercp/kedit.png" width="80" height="80"></a>
If I try JUST that I get the error....
Parse error: syntax error, unexpected '<' in /Sources/Load.php(1748) : eval()'d code(9) : eval()'d code on line 1
Is it possible to get the smf variables?
Thanks in advance.
Whenever I got¬
Parse error: syntax error, unexpected '<' in /Sources/Load.php(1748) : eval()'d code(9) : eval()'d code on line 1
I just created everything on a seprate page and seems to work better...
include_once("./custom/index.php");
Quote from: ibizara on December 17, 2007, 08:57:47 AM
Whenever I got¬
Parse error: syntax error, unexpected '<' in /Sources/Load.php(1748) : eval()'d code(9) : eval()'d code on line 1
I just created everything on a seprate page and seems to work better...
include_once("./custom/index.php");
wot is the complete code you are using can u please give us.
That is all the code... just include a page rather than put code into the custom textarea.
I found it works alot better and gets rid of the error you had below (or it did for me anyway).
s1.png Custom Action Code
s2.png /custom/top.php
s3.png /custom/index.php
(s4.png - My setup with a submenu)
can some one give post some php snippets to use with mod.
I've used this mod with some success on my site. The problem is that the pages only show up in Firefox. None of my members viewing in IE can see the html pages. Is anyone else having this problem? WOuld someone be willing to help me try and fix this?
Thanks in advance!
Just different ways to link external pages...
include("./custom/link.php");
echo'<IFRAME width=100% marginwidth=0 marginheight=0 frameborder=0 SRC="/custom/link.html"></IFRAME>';
Quote from: falguni1 on December 21, 2007, 05:57:43 AM
can some one give post some php snippets to use with mod.
Quote from: ibizara on January 24, 2008, 11:03:36 AM
Just different ways to link external pages...
include("./custom/link.php");
echo'<IFRAME width=100% marginwidth=0 marginheight=0 frameborder=0 SRC="/custom/link.html"></IFRAME>';
Quote from: falguni1 on December 21, 2007, 05:57:43 AM
can some one give post some php snippets to use with mod.
thanks.
alright I've read this thread and looked for other information and am comming up empty handed so Ill ask here
I am using Ultimate FTP to place a FTPish up-loader on my site it has a .js file with it that you are supposed to reference via
<script language="javascript" src="uftplite.js"></script>
I tried changing the src = to the full address of the site I keep getting a box but the applet failes to load Im building locally so unfortunatly I cannot show you whats going on so I just hope that this is not too confusing
alright Im still having issues but I think I got that one figureed out ... the .js file has inside of it the size definitions ofr the applet when I changed them the box that comes up changes so I am actually seeing .js file so it must be something else with the file Ill work it out later. thanks anyway
Quote from: winrules on May 19, 2006, 03:51:54 PM
With the error messages, In the code you added for the button, $txt[rules] should be $txt['rules'].
Thank you winrules...was going crazy for a bit...stupid apostrophes.....;)
Awesome Mod, works like a charm, so I have no problem with it's function, my question is about it's use.
Ok, I have archived another site and what I'm working with is about 370 static html pages with css formating. I can see the ability to add the existing code to custom actions editing all links to point to those actions there by integrating the static set into my 1.1.4 SMF forum and it acting as it did before accept it will be surrounded by my header and footer. Ok, that is nearly perfect except I don't want to let guests have access to those actions. From what I've gathered from this thread is that making the action Php rather than Html will give me the ability to put a user check in every action. While I am fairly proficient with html I am not very familiar with Php as of yet. I have a deadline to meet on the construction of my site otherwise I would just be learning Php and doing this on my own.
My question is this, Is it possible for me to create the action as php, giving me my user check and then have it parse Html code to construct the page. Or alternatively is there a program available that can convert my html code to php.
Any help concerning the possession and regulation of standard html code by SMF would be appreciated. From what I gathered so far in the past 24 hours scouring this site for anything related to this subject is all the solutions in involve transforming my html code to php. Alright well there you have it, I'm sure someone here can enlighten me as to all my options so I can then decide what the best course of action will be.
Thanks.
Jeremy aka Worm
EDIT:I have located a program to convert my html to php and it works!
So all I really need now is a snipet to place at the beginning of my code to dis allow guests.
EDIT 2:ok, I managed to scrounge the first part and it works right
if ($context['user']['is_guest'])
echo "You <FONT color=#ff0000><b>MUST</b></FONT> be a registered member of this site to enter this archive.<BR><BR><BR>";
else
i just need to be able to kill it at this point if guest checks true
EDIT 3: Well that didn't take much time
if ($context['user']['is_guest'])
die('Direct Access to this location is not allowed.');
else
I have been at this site at least a half a dozen times for help. This is the first time I actually posted thinking what i needed wasn't here. Just took me a little longer to find it this time thats all. Leave it to a bunch of forum creators to set the example of how to run a tight ship. Thanks
This is one of the best mods ever. Saved me so much time. Thank U.
I've added a new version that supports 2.0. It included permission control for each action (so you can set whether certain members can view a custom action) and the option to show a button on the main menu for the action.
Thx for updating this great Mod. ;)
But i have one Problem:
in English everything's ok, but when i translate it into german and put it into managesettings.german.php, nothing happens.
The mod still works, but i haven't any text.
Can you please help me. O:)
Should i give you the german translation?
Are you using the SMF 1.1 or the SMF 2.0 version? If you are using the SMF 2.0 version make sure you have cleared the cache in Admin -> Maintenence -> Forum Maintenence -> Common Tasks.
I use 2.0, but only to test.
I am trying custom 3.0. I install the package, then I clicked "apply' and it showed up blank page when I clicked "apply".
It looks like install.php is blank.
Before if you asked me to uninstall the previous version of this mod, I did and even deleted the folder from of it.
Bump.
What SMF version are you using? Do you notice any errors in your error log?
Quote from: winrules on March 24, 2008, 03:42:44 PM
What SMF version are you using? Do you notice any errors in your error log?
1.1.4 of course.
It shouldn't be errors. I mean it can't show it as a errors because when I click "apply" after I installed the package in package manager. Ten I clicked "apply" and it took me a page of blank where it should say "success/failed" but it didn't so it took me to a blank page and other packages don't do something like that.
3.0 only works on SMF 2.0. You need to use 2.04.
Yeah, that's what I have. Thanks!
I guess I posted this on the wrong board:
http://www.simplemachines.org/community/index.php?topic=230762.msg1483865#msg1483865 (http://www.simplemachines.org/community/index.php?topic=230762.msg1483865#msg1483865)
I'm trying to put something like Google Alert results in my forum. I think I'm getting close to what I need but I need some help.
I signed up for Google's Ajax Search API, and created a News Bar using the search terms I want it to return results for.
Then, I downloaded and installed the Custom Action Mod. I created a page and pasted Google's code into the mod pane. I clicked on "go to page" and there it was in all it's glory!
My two problems are:
1. The page includes my list of search terms right at the top of the page in a cluster. I need those to be hidden. I can locate them in Google's code, but I think if I delete them, the search won't operate. I tried deleting them, and it won't function. However, I didn't realize that those terms are hyperlinks which, when selected, change the results. So, I guess there's no way around having them displayed.
2. I need to create a way for members to locate this page either by a Tab, or by a separate board, but I don't know how to do that.
PM me if you want a link to see what I'm talking about.
I appreciate any help you can provide. :)
As far as #2, assuming you are using SMF 1.1 you can create new tabs with this tutorial: http://docs.simplemachines.org/index.php?topic=564
Thank you winrules! I appreciate the tip. I implemented the instructions you referred to and successfully added a new tab, however, all it does is return me to my main page. I think I'm missing something that links the new tab to the action I added using the Custom Action Mod.
I successfully created the page I want using the Custom Action Mod here (http://auditbible.com/index.php?action=News), but the only way to access it is to click the "Go to Page" link on the Custom Action Settings.
How can I make the new tab link to this page so it can be easily accessed by members and visitors?
winrules, does this support ajax/php script?
I'm trying to make a custom page that contains shoutbox, which is uploaded to my localhost,
but since shoutbox contains ajax and php, it doesn't load, at all.
any advice - what am I doing wrong?
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="http://www.coldfusion.ej.am/yshout5/example/css/dark.yshout.css" />
<link rel="stylesheet" href="styles.css" type="text/css" />
<script type="text/javascript" src="highslide/highslide.packed.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>yShout</title>
</head>
<body>
<style type="text/css">
body
</style>
<!-- Begin Shout Box Code -->
<script src="http://www.coldfusion.ej.am/yshout5/js/jquery.js" type="text/javascript"></script>
<script src="www.coldfusion.ej.am/yshout5/js/yshout.js" type="text/javascript"></script>
<script type="text/javascript">
new YShout({
yPath: '/yshout5'
});
</script>
<div id="yshout"></div>
<div align="center">
<p>
<!-- End Shout Box Code -->
</p>
</div>
</body>
</html>
Make sure you have the link right like this:
<a href="', $scripturl, '?action=News">News</a>
ameo - Since you need to add code to the html headers that will not work in version 2.04 (for SMF 1.1). However it will work in 3.0 (for SMF 2.0 Beta 3 Public).
I see. Thank you. So the same thing will work in SMF 2.0 beta?
Could maybe this be modified to work in SMF 1.1.4 or not?
I guess you could do something like after this in CustomAction.php:
$context['page_title'] = $title;
Adding this:
if ($context['current_action'] == 'News')
$context['html_headers'] .= '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="http://www.coldfusion.ej.am/yshout5/example/css/dark.yshout.css" />
<link rel="stylesheet" href="styles.css" type="text/css" />
<script type="text/javascript" src="highslide/highslide.packed.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';
And putting the rest of your script (everything from <body> to </body>) in the code box in the admin panel.
Quote from: winrules on March 29, 2008, 04:01:37 PM
Make sure you have the link right like this:
<a href="', $scripturl, '?action=News">News</a>
Thank you winrules - I really appreciate all your help on this and other issues I've had. I double checked and, yes, I had the right code for the link.
Meanwhile, I installed the Website Button Mod and it links to the url for the page I created using the Custom Action Mod. I think I'll stay with that solution for now.
I'm using 3.0 with SMF 2.0 beta. Other CAM pages work as expected but now I'm trying to experiment with ssi_recentPosts and cannot get it to work.
Page type is PHP
Source File Code block is only:
require(dirname(__FILE__) . '/SSI.php');
Template Code is only:
ssi_recentPosts();
I tried adding echo before the ssi_recentPosts call but that didn't help.
Any suggestions on this?
Do you get any errors or is it just that nothing shows up?
if I put echo before the function I get a blank page; otherwise my normal templates print (to the screen) right to the point where the CAM template kick in, then there is no more HTML.
In the source file code put this instead:
global $boarddir;
require($boarddir . '/SSI.php');
Since the file that is executing that code is actually in the sources directory __FILE__ will be in the sources directory. So "(dirname(__FILE__) . '/SSI.php')" would look for SSI.php in the sources directory instead of the board directory where it really is.
Worked, thanks!
Parse error: syntax error, unexpected '<' in /home/public_html/Sources/Load.php(1853) : eval()'d code(9) : eval()'d code on line 1
:(
Here's what I need but I don't know how to get it:
When someone puts [player]player name[/player] I need to have it search my database for player name, then find the player ID number and make the [player]player name[/player] a link
[url=http://en18.tribalwars.net/page.php?page=inbound&screen=info_player&id=player ID]player name[/url]
id=player ID should be whatever the player ID is.
Can someone help me figure out how to do this?
Quote from: worm82075 on March 17, 2008, 08:47:48 AM
Awesome Mod, works like a charm, so I have no problem with it's function, my question is about it's use.
Ok, I have archived another site and what I'm working with is about 370 static html pages with css formating. I can see the ability to add the existing code to custom actions editing all links to point to those actions there by integrating the static set into my 1.1.4 SMF forum and it acting as it did before accept it will be surrounded by my header and footer. Ok, that is nearly perfect except I don't want to let guests have access to those actions. From what I've gathered from this thread is that making the action Php rather than Html will give me the ability to put a user check in every action. While I am fairly proficient with html I am not very familiar with Php as of yet. I have a deadline to meet on the construction of my site otherwise I would just be learning Php and doing this on my own.
My question is this, Is it possible for me to create the action as php, giving me my user check and then have it parse Html code to construct the page. Or alternatively is there a program available that can convert my html code to php.
Any help concerning the possession and regulation of standard html code by SMF would be appreciated. From what I gathered so far in the past 24 hours scouring this site for anything related to this subject is all the solutions in involve transforming my html code to php. Alright well there you have it, I'm sure someone here can enlighten me as to all my options so I can then decide what the best course of action will be.
Thanks.
Jeremy aka Worm
EDIT:I have located a program to convert my html to php and it works!
So all I really need now is a snipet to place at the beginning of my code to dis allow guests.
EDIT 2:ok, I managed to scrounge the first part and it works right
if ($context['user']['is_guest'])
echo "You <FONT color=#ff0000><b>MUST</b></FONT> be a registered member of this site to enter this archive.<BR><BR><BR>";
else
i just need to be able to kill it at this point if guest checks true
EDIT 3: Well that didn't take much time
if ($context['user']['is_guest'])
die('Direct Access to this location is not allowed.');
else
I have been at this site at least a half a dozen times for help. This is the first time I actually posted thinking what i needed wasn't here. Just took me a little longer to find it this time thats all. Leave it to a bunch of forum creators to set the example of how to run a tight ship. Thanks
Your post helped me a lot, thank you for all your hard work tracking this info down and posting it in this thread...Well done.
i try a simple php code and nothing appear in the action , what i can do?
Quote from: NIBOGO on April 19, 2008, 07:36:02 PM
i try a simple php code and nothing appear in the action , what i can do?
Can you post the code you used here?
Hi, I scimmed through the entire topic and couldn't find the answer to this question so I'm going to ask it, if it's already been answered, I appoligize:
Where are the custom actions stored? That is, when I create a custom action, I know how to view it and everything. However, right now, my site is getting huge parse errors everywhere (I think it is because of my host) so I am going to move to a different host that doesn't mess with your files. Unfortunately, right now I can't login or anything because of the errors so is there a place in the MySQL database where I can find all of the code for all of the custom actions I had? I had a lot of custom actions and it would take days to restore all of them so where is this data located? Thanks in advance!
If you are using SMF 1.1 they are stored in the settings table in the database. If you are using SMF 2.0 they are stored in the custom_actions table.
Cool, I found it, sorry for forgetting to say my version number (which is 1.1.4 which may be needed for my next question) I have one more question. I noticed that often times when you try to "restore" a forum (not restore the entire database but just restore the users or all of the posts or some other aspect, it doesn't really work all the time. For example, when you recover the smf_members table, glitches pop up in the total number of members and everything until you change the most recent member id. Will this same kind of effect happen when I recover all of the custom actions related variables and values from my smf_settings table? That is, if I back up all of those custom actions now (by just backing up the variable and value for the title, code, name, and type of each), is there anything in another table (or somewhere else in smf_settings) that I have to backup as well for it to work correctly on a totally new installation when I restore it?
Is there a way to allow specific members to edit this section as well>? Also, how do you stop the center block for tinyportal from showing in the custom actions?
I currently have SMF 2.0 beta 3.0 installed, with the mod installed on it.
Can I update my SMF 2.0 Beta 3 forum to SMF 2.0 Beta 3.1 and will the Mod work??
many thanks, and a great mod!
when i make a php page then go to the page i get the following error...
Parse error: syntax error, unexpected $end in /home/sites/forgeguide.com/public_html/Sources/Load.php(1747) : eval()'d code(9) : eval()'d code on line 1
<newb>
OK. I'm not sure if this is a question for this topic or not but I have to ask. I am able to use the mod fine. What I want to do, though, is to change the 'home' button so that it links to my custom page. I am using smf 2.
Please help.
Thanks!
</newb>
Why ain't v3.0 avabile for 1.1.4? :'( :'( :'(
How can I get all the TinyPortal blocks to show up on one of my custom pages?
Thank you.
anyone tested in 1.1.5?
mod site says only for 1.1.4 but because most of the mods then also run in 1.1.5, I tested but always get a parse error in the .xml files ::)
I have it up in my 1.1.5 forums. works great for me.
now it works
had to upload a new temp file in the packages and then it worked well :D
Just wanted to say a big Thanks! for making this fantastic mod. ;D
I can't even begin to tell you how much added functionality this has given to my site.
Installed on SMF 1.1.5 - with absolutely no trouble.
Hi, I am able to make the action just fine but what I need is to have that action listed in the visibility options so that I can place a Tiny Portal Block there by itself.
i.e. custom action = "Chat"
Actions:
|
Display on all pages and sections
|
Front page Forum Recent Show unread Unread replies Profile My Messages
**Chat** | Calendar Admin Login Logout Register Post Stats Search Memberlist |
Is this possible?
Also, how do I delete the actions menu tab after deleting an action...do I have to do this manually in index.template?
Can I use this to add a custom action for my coppermine gallery. I want to add an action "gallery" that links to my coppermine index without breaking the action url.
I have installed this mod on version 1.1.5. The install went fine with no errors.
When I go to Features/Custom Actions I get a blank page.
Quote from: winrules on April 23, 2008, 03:24:19 PM
If you are using SMF 1.1 they are stored in the settings table in the database. If you are using SMF 2.0 they are stored in the custom_actions table.
It'd be cool if that were true in 1.1 too. Any chance of an upgrade? :) I would hate to somehow crash my settings table. (I'm dealing with a lot of actions)
While I'm tossing things around ;) I would also like to see - in the admin area.... just a list of actions, linked to the individual action forms... instead of having all the actions editable from one big page.
Thanks for a great mod.
digit
When i add a php action it shows this error ...
Parse error: syntax error, unexpected '<' in /home/alblove/public_html/forum/Sources/Load.php(1726) : eval()'d code(9) : eval()'d code on line 1
Can someone help me ?
Hi,
How can I translate this mod?
Hey Winrules.....
In the admin area, where we have the list of actions, how would I add the current custom action name to the html? I have a lot of actions, and it's hard finding any of them, since I can not search for text in an input box. I would like to hit control-f and find the actions.
See attachment - notice the text in red....
Thanks again for my favorite mod! :D
I have just installed this Mod and when I tried to go in Admin Section following message appeared,
Fatal error: Cannot redeclare template_show_custom_action() (previously declared in C:\Inetpub\vhosts\lahorerang.com\httpdocs\Sources\Load.php(1859) : eval()'d code:1965) in C:\Inetpub\vhosts\lahorerang.com\httpdocs\Sources\Load.php(1859) : eval()'d code on line 2106
Forum Name is
www.Lahorerang.com (http://www.lahorerang.com)
Please Tell me How I can Fix this problem
Thanks
Waiting
Very, very good work, WinRules. This is definitely one that I enjoy using, a lot!
There is a modification I'm working on for it that seems to be working well - adding stylesheets that are correctly served as text/css. I did the same thing with my TinyPortal installation several months ago, for blocks and articles. It's a modification to the root index.php (simply adding the css action in), then a new function in CustomAction.php, using the same functions that the .xml action uses to avoid the attempt to find a template. The new function in mine is called CustomActionCSS. This applies only to the SMF 1.1.x installation for this mod and not the SMF 2.0 version. But code is free to give out so here it is! (Be aware that errors may happen if my installation instructions weren't as clear as perhaps they should be lol). :P
Sources/CustomAction.php:
Add function to any area of the file, just not before <?php or ?>, or inside another function. That would be bad. Anywhere in between the tags and outside of a function will do.
// Parse this action's stylesheet!!!
function CustomActionCSS()
{
global $context, $modSettings;
ob_end_clean();
if (!empty($modSettings['enableCompressedOutput']))
@ob_start('ob_gzhandler');
else
ob_start();
header('Content-type: text/css');
if(!empty($_REQUEST['action']) && $_REQUEST['action'] == 'css')
{
if(isset($modSettings['CA' . $_REQUEST['style'] . '_css']))
{
echo $modSettings['CA' . $_REQUEST['style'] . '_css'];
}
else
{
echo '';
}
if (isset($_REQUEST['substyle']))
{
if(!empty($modSettings['CA' . $_REQUEST['style'] . '_sa' . $_REQUEST['substyle'] . '_css']))
echo $modSettings['CA' . $_REQUEST['style'] . '_sa' . $_REQUEST['substyle'] . '_css'];
else
echo '';
}
}
obExit(false);
}
index.php:
Find:
'cleanperms' => array('Admin.php', 'CleanupPermissions'),
Add:
'css' => array('CustomAction.php', 'CustomActionCSS'),
Sources/Subs.php:
Find:
function setupThemeContext()
{
global $boarddir, $db_prefix, $modSettings, $user_info, $scripturl, $context, $settings, $options, $txt, $maintenance;
Add Below:
//CUSTOM ACTION!
// Action
$i = 1;
while (isset($modSettings['CA' . $i . '_name']))
{
// Is this it?
if ($context['current_action'] == $modSettings['CA' . $i . '_name'])
{
if(!empty($modSettings['CA' . $i . '_css']))
$context['html_headers'] .= "\n\t\t" . '<link rel="stylesheet" type="text/css" href="'.$scripturl.'?action=css;style='.$i.'" />';
break;
}
$i++;
}
// Subaction
if (isset($_REQUEST['sa']))
{
// A subaction was specified, try to find it.
$n = 1;
while (isset($modSettings['CA' . $i . '_sa' . $n . '_name']))
{
// Is this it?
if ($_REQUEST['sa'] == $modSettings['CA' . $i . '_sa' . $n . '_name'])
{
if(!empty($modSettings['CA' . $i . '_sa' . $n . '_css']))
$context['html_headers'] .= "\n\t\t" . '<link rel="stylesheet" type="text/css" href="'.$scripturl.'?action=css;style='.$i.';substyle='.$n.'" />';
break;
}
$n++;
}
}
unset($i);
unset($n);
If you use the html_headers variable to store those lines, you may find that stylesheets you write in the custom action config can overwrite values in your normal style.css file. If you find this is the case, create a new variable in css such as $context['html_headers']['css'] or whatever you want to call it, and place that in index.template.php.
About the Load.php problem with template_show_custom_action() - apparently that function is repeated twice, for some reason in your load.php file. It looks like your site is working though right now, far as I can tell.
Hmm. I can't get this mod to install. When I click, "Apply mod" it goes to a blank white screen. :O
I'm using SMF 1.1.5 with these mods installed:
1. AEF Login Fix 1.0
2. Remove Post Modified Time 1.2
3. View_Email_Permission 1.0
4. AJAX Instant Quick Reply 1.0.1
5. Prevent Adding Signature Images And Links 1.3
Normally when something doesn't work, it brings up a warning screen about a possible conflict - the fact that it just goes straight to a blank screen is concerning. :P
-
I Love this mode.....BUT ITS DRIVING ME CRAZY
ive made so many custom pages. and when i upload them it seems to go fine, then just goes to a blank white page (which is done loading). After that i get to admin and try click custom actions and all i get is a white page. ITS KILLING ME!!! ive spent months making my site, had this happen, redid it all and its happened again and i cant get back into custom actions to add new pages or edit the old ones
If anyone has the answer to fix this PLEASE, PLEASE, PLEEAAASSEEEE HELP ME!!!!
i dont wanna spend 3 weeks full time trying to make this again
Thanks guys,
Steph
also how do i back up my custom mod pages, ive uploaded over 1000 and lose them, then i got to go back and make new page, make the links , link them all again.
Is there a file with them all stored, or some sort of table i have to download (i have no idea how to do this by the way)
Quote from: Atheo on May 16, 2008, 01:45:37 PM
<newb>
OK. I'm not sure if this is a question for this topic or not but I have to ask. I am able to use the mod fine. What I want to do, though, is to change the 'home' button so that it links to my custom page. I am using smf 2.
Please help.
Thanks!
</newb>
Just a follow up in this question, and I ain't using SMF 2.0
Anybody have a clue?
I tried putting CustomAction.php as the required file when the command is empty in index.php but I cannot get it to choose a certain command so it loads up blank
Also I'm thinking of using the site integration mod but apparently the pages made here are stored in the database instead of a separate php file...
so any help, idea or clue would be fine...
ok, i actually found out how to do what i asked and what Atheo asked
First open: $boarddir/index.php
Find:
if (empty($board) && empty($topic))
{
require_once($sourcedir . '/BoardIndex.php');
return 'BoardIndex';
}
Replace by:
if (empty($board) && empty($topic))
{
require_once($sourcedir . '/CustomAction.php');
return 'CustomAction';
}
Second open: $sourcedir/CustomAction.php
Find:
// Is this it?
if ($context['current_action'] == $modSettings['CA' . $i . '_name'])
{
// Set $type, $title and $code, which will later be put into the $context variable.
$type = $modSettings['CA' . $i . '_type'];
$title = $modSettings['CA' . $i . '_title'];
$code = $modSettings['CA' . $i . '_code'];
// No need to continue.
break;
}
ADD AFTER:
elseif ($context['current_action'] == '')
{
// Set $type, $title and $code, which will later be put into the $context variable.
$type = $modSettings['CA' . '1' . '_type'];
$title = $modSettings['CA' . '1' . '_title'];
$code = $modSettings['CA' . '1' . '_code'];
// No need to continue.
break;
}
IMPORTANT NOTE: The number 1 at the above code represents the first custom action you have in the list of custom action pages you made. Change the number accordingly depending on what number the page you want counting from top to bottom.
IS this going to be updated to work with 1.1.6?
Quote from: cme1st2302 on September 09, 2008, 09:21:16 AM
IS this going to be updated to work with 1.1.6?
Works perfectly fine with my 1.1.6 forum.
I am confused. The test fails in the package manager on modSettings.php. I checked for all the code that it has to replace and it is all there. Why is it failing the test???
It has to be exact, and if it's failing in that single file, you can add the code manually. Having a single test failed issue doesn't mean it wont work, just means a single (or more) piece of code it needs to find to perform an automated installation isn't there.
I went to the package parser and copied the code exactly from there and did a search for it in the file. Every one of them was found. I will most likely just install it anyway and see if it works.
Yes, just check and make sure the code is all there. If not just add and you'll be fine.
:D Thanks for your help Rumbaar!!! :D
One more question. Where are the files that you create saved at?
You're welcome,
Also please edit your post instead of double posting, and also search this thread it has been covered a number of times where the data is stored for each version of SMF.
Quote from: winrules on April 23, 2008, 03:24:19 PM
If you are using SMF 1.1 they are stored in the settings table in the database. If you are using SMF 2.0 they are stored in the custom_actions table.
I want to implent this mod to my site, working as it is written in custom installation for 1.1.6 tutorial, but i cannot find Sources/ManageSettings.php :D
Any help...??
I want to add a wiki to my site. It would involve a page with a search box that links to term pages....like wikipedia but specifically for alternative fuels.
www.fuelcrazyamerica.com
is this possible?
Quote from: Don Pepito on September 25, 2008, 08:27:44 AM
I want to implent this mod to my site, working as it is written in custom installation for 1.1.6 tutorial, but i cannot find Sources/ManageSettings.php :D
Any help...??
You are using the 2.x version, please use the 1.1.x version for your 1.1.x version of the forum.
The custom action can be any custom code you want, either HTML, BBC or PHP. So if you've got a page written you can put it in there as a custom action.
Hey all, good morning (at least here and at this time LOL)
I would like to change the THEME for one custom action (action=podcast, theme Musiconia... see where it's going?).
How?
In your Admin CP if you click under Configuration - Features and options you shall find Custom actions in second row. Right next to basic features.
Not possible with the current coding of the mod. As the theme is loaded before the custom action is called and by then I'm sure it's too late.
Is there any way to allow blocks to show on the custom made pages using this. I have changed some things to get the custom action to show up in my choose where to be visible section for editing blocks but can only get top blocks to show up on the the custom made page. I am trying to create custom pages and assign blocks to only the custom page. I am using smf 1.1.6 and tp 1.0.5 thanks for any help.
As for custom blocks, you might want to search over at TP for tips/tricks relating to the mod and a block. I know on many occasions I've found a block code to meet my needs when dealing with addon mods.
Its not a custom block that Im trying to add. Its a custom page(which the mod allows you to do) except I want blocks such as recent topics or stats box or a script box to show only on this custom page. I can get it to work for the top blocks fine. I edited the TPortalAdmin.template.php(which i know is not smf) in the place where it show the extended visible options and got the custom page action to show up on the settings where I can choose what page I want the block to be seen on or all of them. But I can't get it to let me show blocks on the right or left of these custom actions(pages) If I set them to the top or upper blocks they show but won't show on the sides. Why can side panels not show on the custom action, or as I would call them pages?
Well the functionality of blocks isn't part of the Custom Action Mod, so I think you need to direct those kind of questions to the TP support forum. You'll most likely have to create a block for each action and mark it to show on that key action, in the block options.
Thats what I have done, but the blocks assigned to show in that action if set to the right or left panels do not show. They will show if set to the top panel only? I know that it is a TP question mostly but I was just wondering why this mod will make pages that have visible top panels but not sides, and if there is some way to change that so it shows the side panels? I hoped to be able to use the mod as it creates the page like I want but just creates a page that doesn't have side panels, why is that? What is the blank page it makes a replica of, the forum page with the forum removed? I only ask this because I can't make blocks visible on my forum page either if set to the side panels, only the top panel, I just wondered if there was some way to change the mod to make a page the same as the frontpage on my TP site with all the blocks visible if something is set in them?
The display and functionality of TP and it's block with the interaction of any pages or custom action pages is purely a TP related issue. Please search TP forums, as I found all the answer you seek regard blocks and custom actions when I had the similar issues on my forums.
Thanks for the help. I finally got it late last night after beating my head off the desk for a week. :D I could try to explain it but don't know if I have the vocabulary for such an explaination. Thanks again for the info and help.
Hi,
It's possible use this mod to put the photopost whit the header and footer of smf.
I have a integration whit smf and photopost. users and styles works good,but I want the photospost to open inside of smf.
Like this http://www.enfoca2.com/galeria/ (http://www.enfoca2.com/galeria/)
Sorry my english
is this mod be able to put custom action into the homepage/frontpage itself?
home is something like www.abc.com/qwerty/index.php
thanks!
@fermachado Haven't used that, but if you're able to include the custom action as written PHP code I'm sure you could include it. But I doubt it would be a straight forward as that and would require a number of path and source rewrites on that applications behalf.
@ryozo The custom actions will only be access through the forum and index.php file. So if I read you right, then no you wont be able to use it on your homepage/frontpage. Unless you're using SMF as this via a portal mod.
ok. thanks!
Has anyone tried this with smf 2b4?
I tried this, it wont work correctly in 1.1.7, heres my modsettings.php
I have 1.1.7 and this mod works 100% without error or issue.
for me, it wont show the actions tab in features and settings, if thats where it goes
Well when you install the mod you got Test Failed errors and you proceed anyway? Put the mod through the parser and make the manual edits to the that file, and other file that Test Failed, and you should be set.
i did a manual edit, still nothing, the item that failed was the modsettings.php
Well you didn't edit it correctly, go back and check that all the code that should be in there is in fact in there.
Hi ive just installed custom action3 on smf 2.0, ive use this mod on 1.17 no problem but i can get the new version to do ******! When i click the new mwnu tab it creates i just get the board. Could someone please post a screenshot of their custom action admin screen with all the code in so I can see what I should be putting where, many thanks, I'm sure this will help many people.
e.g. A screen shot like this but filled in with an actual working action so I can use to test and then modify for my own custom page, thanks
Great mod ..... Thanks very much,
makes modifying the smf platform so much easier
:D
In the CUSTOMS ACTION mod located in the "Features and Options" Admin page, how do I increase the maximum characters that the Code Textarea Field can accomodate? I've already increased the maximum capacity of the Value field in the SMF_SETTINGS Table by changing it to MEDIUMTEXT instead of just TEXT but my text input is still being chopped.
Works with 1.1.7
Thanks
Quote from: wakewatcher on December 09, 2008, 09:23:12 PM
Has anyone tried this with smf 2b4?
Yes sir, and it works beautifully on my 2.0 beta 4 installation! Remember to manually edit your language files though if you don't use English as your board language.
I am using membergroup on registration but I only want the invited people to register to certain one membergroup at a time.
For instance if I want to create custom action registermu so that registration through that custom action will only allow member to join Manchester United membergroup. Then, I want to create custom action registerlpl so that registration through that custom action will only allow member to join Liverpool membergroup. And other group etc...
The purpose is that when member is invited with the respective custom action registration link, they can only see and choose to join the given group only rather then seeing the whole group available.
Btw, since the currently custom action page is not viewable by guests, I may need to be change as well so guest can see and register through this page.
Can anybody help me on this? I am using smf 1.1.7. I attached here my register.php file.
You're after a custom code to allow for URL to only allow for a single membergroup option. Which isn't really the realm of support for the mod, as the mod is working for you.
You'll need to try a Mod Request, or the SMF Coding area for that kind of assistance.
Thank you.
Trying to wrap my head around the difference between actions and subactions. I THINK what I want is subactions..
I've got 3 sets of "things to do" depending on the users permissions and the status of some fields in a db table. It's a radio station/shoutcast site, if that helps put it in context
1. if the automatic playlist is active and a user has the right permissions, they have a link in the header that triggers stopping the auto playlist as well as updating some fields in the DB
2. if it's the same user from #1, they now have a link in the header that triggers the auto playlist to re-start(after they're done broadcasting)
3. at all times, admins(and whoever has the right permissions) has a link to "reset" the shoutcast stream
All 3 of these cases are some combination of function()s that I already have working.. Since they're so closely related, I've got them as subactions
http://www.ghettoradio.us/forums/index.php?action=Stream;sa=Start
http://www.ghettoradio.us/forums/index.php?action=Stream;sa=Stop
http://www.ghettoradio.us/forums/index.php?action=Stream;sa=Reset
This means however that I have nothing in the main Stream custom action
I suppose the alternative would be to create each of those as a custom action, without any subactions
I've been reading thru the docs but can't really find a good description of actions vs subactions
2nd part... Since those 3 actions above are all doing 'internal' stuff, what's the best way to do its job and then redirect the user to a specific page?
Is there a way to make only "registered" users view it? And how would I add "Members viewing this page" to it?
In 1.1.x I don't think it's possible, in 2.x I think there are more permissions options.
Will this mod work for version 2 RC1? The installer is giving me a 'test failed' error on Admin.php.
Test Failed doesn't indicate it wont work with RC1, but due to the change from BETA to RC I can't say. Hopefully the developer will answer that one or update the compatibility.
really looking forward to update! its an great mod!
gj m8!
I agree with herka, and also look forward to the RC1 update
I tried to do a PHP custom page but when I navigate to the custom action it gives out a blank page. This is the code. I'm running SMF 2.0 Beta 4. I'm a total PHP newbie so maybe I did a mistake in the code.
<?php
require_once("SSI.php");
function template_main()
{
global $context, $db_prefix, $options, $settings, $scripturl, $txt, $user_info;
echo '
<a href="' , $scripturl, '?action=trader&id=' , $user_info['id'], '">Vai al tuo profilo di feedback</a>
| <a href="http://www.mysite.com/mlist/?sa=search">Cerca il profilo di un altro utente</a></ br>
<a href="http://www.mysite.com/index.php?action=custom;sa=subcustom">Vai al motore di ricerca carte</a></ br>';
if (in_array(11, $user_info['groups']))
echo 'Grazie per esserti iscritto al Supporter! Ora puoi accedere al motore di ricerca carte.';
else
echo 'Ricorda che per accedere al motore di ricerca carte devi essere un Supporter! Clicca <a href="http://www.mysite.com/profile?sa=subscriptions"> QUI </a>per iscriverti!';
}
?>
I have this mod installed on my 1.1.8 forum and would like to know how to stop the subactions from opening in a new window?
Thanks,
Chris
There must be coding in your sub-action or externally, as any action shouldn't be opening a new window via it's own code.
Quote from: darkelhaym on February 11, 2009, 09:09:02 AM
I tried to do a PHP custom page but when I navigate to the custom action it gives out a blank page. This is the code. I'm running SMF 2.0 Beta 4. I'm a total PHP newbie so maybe I did a mistake in the code.
Take out the <?php and ?> tags
require_once should be your first line and } should be how it ends
Quote from: buspass on February 12, 2009, 10:38:07 PM
Quote from: darkelhaym on February 11, 2009, 09:09:02 AM
I tried to do a PHP custom page but when I navigate to the custom action it gives out a blank page. This is the code. I'm running SMF 2.0 Beta 4. I'm a total PHP newbie so maybe I did a mistake in the code.
Take out the <?php and ?> tags
require_once should be your first line and } should be how it ends
Did not work alone, but started working when I took out this line:
function template_main()
Thanks!
The MOD works pretty cool on SMF 2.0 RC1 , You just have to go:
yourforum.com/index.php?action=admin;area=featuresettings;sa=action
NIBOGO
Handy Hint, Thanks :D
Awesome mod
can anyone help me with the installation of this mod in smf 2.0 RC1?
code parser saying me:
Quoteinstall.php
This file should not be able to execute standalone. You may have to run the following queries manually.
how can i do this?
thanks :D
Do a search, as running queries isn't mod specific, but you'll need to run the queries at your phpMyAdmin level. Be sure to put n correct smf prefix for your db. default is smf_
Quote from: Rumbaar on February 23, 2009, 04:39:18 PM
Do a search, as running queries isn't mod specific, but you'll need to run the queries at your phpMyAdmin level. Be sure to put n correct smf prefix for your db. default is smf_
sorry, what i have to do exactly? can you explain me how and where i have to put the queries? thanks in adv
hey guys,
I just installed the mod. All seems fine, but when i click on Features and Options in the CP, i get a blank page. Any ideas?
running 1.1.8 - heavily modded - Custom theme installed
edit: ive added the index file and Modsetting file as attachemnt here.
index.php should have anything to do with it. Be sure to set your language to english. Also did it install without any test failed messages?
yes, it installed with no error.
according to the help install file is says to edit the index.php file
(http://imagesocket.com/view/untitled364.JPG)
I'll check the language
Yes I meant the index.php file wouldn't be causing the issue.
Please use the parser for the mod and check the code in your ModSetting.php file. There appears to be errors with the insertion of the mods code into that file.
thanks, Rum.
i'll do that
error found. Thanks Rum.
it's working just fine now :)
Winrules Does your mod needs some update for RC1 or I can use this 3.0 version ( Beta 3 compatible )? :)
Quote from: AlenNS on March 02, 2009, 05:36:26 PM
Winrules Does your mod needs some update for RC1 or I can use this 3.0 version ( Beta 3 compatible )? :)
http://www.simplemachines.org/community/index.php?topic=86793.msg1930782#msg1930782
I had installed this mod on Beta 4 and now I'm using RC1.
I am getting this error on installation:
QuoteDatabase Error Table 'baklja_smf1.custom_actions' doesn't exist
File: /home/baklja/public_html/forum/Packages/temp/install.php
Line: 98
Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 2.0 RC1, while your database is at version 2.0 Beta 4. The above error might possibly go away if you execute the latest version of upgrade.php.
Add manually the tables to your db
I'm not sure if I would know to do that. :S
Are the instructions in install.php?
Yep with your own prefix of course
Ok. I'll try. Thanx
Quote from: NIBOGO on March 02, 2009, 07:04:17 PM
Add manually the tables to your db
I solved this problem.
I left this table in my database after upgrade to RC1 and when I deleted it installation was successful.
I had one error in installation.
Sources file: Admin.php
It asks for:
Quote'pruning' => array($txt['pruning_title']),
And I have this:
Quote'pruning' => array($txt['pruning_title'], 'admin_forum'),
So I insert this line after:
Quote'action' => array($txt['custom_action_shorttitle'], 'admin_forum'),
Im trying to produce a page of recent topics and i've added the following code with PHP set.
It's not working for me. Am i missing something? It does produce my themed page but not a recent topic listing
require("/httpdocs/forum/SSI.php");
ssi_recentTopics();
ok, after a bit more digging, i decided to make a test.php page and upload it to my forum directory.
the contents of this page is:
<?php
require(dirname(__FILE__) . '/SSI.php');
ssi_welcome();
?>
Dont ask me how i came up with that path to my SSI. I found it in my ssi example php. From what it seems that does not look like the standard path, but anyway, i load up the test.php file in my browser and it works!!!
Now, when i paste it in a custom action it doesnt work :(
and yes, i did leave off the <?php and ?>
any ideas?
Got it working with:
require_once("SSI.php");
ssi_recentTopics();
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:
yourforum.com/index.php?action=admin;area=featuresettings;sa=action
NIBOGO, but is not a button in Admin area?
I installed manually this nice Mod and works ok, but i have not the button in admin area..it's normal?
I have SMF2 RC1
Thanks!
Antonio
Quote from: fotografo74 on March 12, 2009, 05:26:18 AM
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:
yourforum.com/index.php?action=admin;area=featuresettings;sa=action
NIBOGO, but is not a button in Admin area?
I installed manually this nice Mod and works ok, but i have not the button in admin area..it's normal?
I have SMF2 RC1
Thanks!
Antonio
Yes it's normal on RC1, I have no button either. We'll have to wait for an updated version in the meantime!
Quote from: Vandaahl on March 12, 2009, 07:23:39 AM
Quote from: fotografo74 on March 12, 2009, 05:26:18 AM
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:
yourforum.com/index.php?action=admin;area=featuresettings;sa=action
NIBOGO, but is not a button in Admin area?
I installed manually this nice Mod and works ok, but i have not the button in admin area..it's normal?
I have SMF2 RC1
Thanks!
Antonio
Yes it's normal on RC1, I have no button either. We'll have to wait for an updated version in the meantime!
Oh, thanks ! :-)
Antonio
Hi there !
Same here. But I had also the problem, when I go to the link given here directly to the costum action mod admin page, I do not habe the menus for edit and create costum action pages ....
So it will not work for me.
Is this because I have a german board?
What to do??
So, after hack the "load standard language" mod also this mod works fine with 2.0RC1 :D
Yes you need to ensure that all mod specific $txt[] are converted and installed for your current language.
Can I install this to 1.1.8 with package manager or do I have to install it manually??
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
Hi,
Exist any update to 1.1.8?
I just discovered 1.1.8 messed up all my sub-actions.
thanks in advance.
best regards
javier
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.
Hmm, well, i only had one problem, with the Admin.php file, but i added that manually. Like the guy here (http://www.simplemachines.org/community/index.php?topic=86793.msg1959718#msg1959718). 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?
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.
Uh, i'm sorry, but i can't find no error log in there either.
Database
Optimize all tables
Backup Database
Convert the database and data to UTF-8
-
Routine
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
-
Members
-
Topics
What version of SMF are you using?
1.1
Enable:
AdminCP->Features and Options->General=>Enable error logging
Check Log:
AdminCP=>Forum Error Log
2.0
Enable:
AdminCP->Security and Moderation->General=>Enable error logging
Check Log:
AdminCP=>Logs
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.
EDITED:
First - the change to Admin.php mentioned above is in this message: http://www.simplemachines.org/community/index.php?topic=86793.msg1959718#msg1959718
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:
yourforum.com/index.php?action=admin;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:
http://www.website.com/forum/index.php?http://www.website.com/forum/
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?
--
http://www.website.com/forum/index.php?action=admin;area=securitysettings;sa=general
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.
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,
Fredrik
Hello...
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/bimeiden.nl/public_html/Themes/default/CustomAction.template.php(9) : 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?
Try taking out the <?php and ?> tags at the very beginning and end of your chat page
have done that... now it says this:
Parse error: syntax error, unexpected '<' in /home/bimeiden/domains/bimeiden.nl/public_html/Themes/default/CustomAction.template.php(9) : eval()'d code on line 26
It is the part where <html> begins... :(
hello.. sorry for bumping this up.. but i really want to integrate the chat.. so if anyone can help me.. then please :)
try pasting this code exactly in your custom action and make your page title "123 Flash Chat"
if (!defined("SMF")) define("SMF", "1");
include('Settings.php');
include('Sources/Load.php');
include('Sources/Subs-Auth.php');
include("mysql4.php");
$_COOKIE[$cookiename] = stripslashes($_COOKIE[$cookiename]);
echo $_cookiename;
list ($ID_MEMBER, $password) = @unserialize($_COOKIE[$cookiename]);
$username_field = "memberName";
$password_field = "passwd";
$usertable = $db_prefix."members ";
$db = new sql_db($db_server, $db_user, $db_passwd, $db_name, false);
$sql = "SELECT " . $username_field.",".$password_field.
" FROM " . $usertable . "
WHERE ID_MEMBER = ".$ID_MEMBER;
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$username = $row[$username_field];
$password = $row[$password_field];
$user = '';
if($username !=''){
$user = '&init_user='.$username.'&init_password='. $password;
}
echo'
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/ swflash.cab#version=6,0,19,0" WIDTH="634" HEIGHT="476">
<PARAM NAME=movie VALUE="client/123flashchat.swf?init_room=1'.$user.'">
<PARAM NAME=quality VALUE="high"> <PARAM NAME="menu" value="false">
<EMBED src="client/123flashchat.swf?init_room=1'. $user.'" quality=high menu=false WIDTH="634" HEIGHT="476" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">
</EMBED>
</OBJECT>';
remember DO NOT ADD <? or ?>!
This time it gave a total other error then what i have seen so far....
Fatal error: Cannot redeclare reloadsettings() (previously declared in /xxx/xxx/xxx/xxx/xxx/Sources/Load.php:140) in /xxx/xxx/xxx/xxx/xxx/Sources/Load.php on line 342
weird....
thanks for the reply tho! :D
okie dokie I got that same error when I tested it on my site (but I didnt have the rest of the stuff so I thought it might fix it for someone with all the files so Ill look at it again and see what I can come up with
I dont have a clue if this will work or not but give it a shot and see what happens Ill look more into it tommarow
if (!defined("SMF")) define("SMF", "1");
global $user_info;
include("mysql4.php");
$user = '';
if($username !=''){
$user = '&init_user='.$context['user']['name'].'&init_password=pass';
}
echo'
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/ swflash.cab#version=6,0,19,0" WIDTH="634" HEIGHT="476">
<PARAM NAME=movie VALUE="client/123flashchat.swf?init_room=1'.$user.'">
<PARAM NAME=quality VALUE="high"> <PARAM NAME="menu" value="false">
<EMBED src="client/123flashchat.swf?init_room=1'.$user.'" quality=high menu=false WIDTH="634" HEIGHT="476" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">
</EMBED>
</OBJECT>';
It works!!!! Freaking awsome!!! Thank you so much!
The only thing is that the members are not automatically logged in, so they have to fill in there password. But i can live with that :D
I also have found out a nother problem... i have my own theme with a pulldown menu. Now the pull down menu is not visable, since it go's "behind" the page. What can i do?
And i also have the same version chat, but an avatar chat. Now i have only changed the .swf name and it works, however.. i have to erase the
if (!defined("SMF")) define("SMF", "1");
global $user_info;
include("mysql4.php");
$user = '';
if($username !=''){
$user = '&init_user='.$context['user']['name'].'&init_password=pass';
}
part.. since this line is showing above the chat.
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:
yourforum.com/index.php?action=admin;area=featuresettings;sa=action
how ?
Let's say a custom action is html code but it works with a script that uses some files in folders.
Where should these folders be placed inside the SMF root, so the are called properly without modifying the paths.
Folders call for /something/abc.js
so they call the relative location
What would be a relative location for the custom action? Theme folder? Sources?
I get "Test Failed" - Execute Modification on ./Sources/Admin.php
I have SimplePortal 2.2.2 installed on my SMF 2.0 RC1-1
The modification on the file should be:
Find [Select]
'pruning' => array($txt['pruning_title']),
Replace [Select]
'pruning' => array($txt['pruning_title']),
'action' => array($txt['custom_action_shorttitle']),
But as far as I can see the string we want to replace should be
'pruning' => array($txt['pruning_title'], 'admin_forum'),
Not sure what will happen if i just continue with the install and replace the line in question manually...
Please help me out a bit :)
SMF 2.0 RC1-1 + SMF 2.0 RC1-2
Admin.php
Find
'profile' => array($txt['custom_profile_shorttitle'], 'enabled' => in_array('cp', $context['admin_features'])),
Replace with
'profile' => array($txt['custom_profile_shorttitle'], 'enabled' => in_array('cp', $context['admin_features'])),
'action' => array($txt['custom_action_shorttitle'], 'admin_forum'),
Not sure if Winrules is actively keeping this updated or not... but I made some changes to the back end so it was easier to edit code, including adding a javascript syntax highlighter/editor...
Quote from: MissyNL on May 05, 2009, 03:10:26 PM
This time it gave a total other error then what i have seen so far....
Fatal error: Cannot redeclare reloadsettings() (previously declared in /xxx/xxx/xxx/xxx/xxx/Sources/Load.php:140) in /xxx/xxx/xxx/xxx/xxx/Sources/Load.php on line 342
thanks for the reply tho! :D
I hate to gripe but apparently this got solved and nobody posted HOW, so of course after all this reading I finally find the same problem I'm having but no solution. OK moving on . . . . what is the solution to this error? Thanks.
Palyne
Anything that is redeclared means the function has been, as the error says, declared more than once, which is not possible in PHP...
You should almost never use include() or require()... you should use include_once() or require_once() instead.
Hello, I have installed the Custom tab, which i intend using it for Live Radio. I have another site that i have intergrated the radios in with a pop up javascript and i believe this Custom Ad Mod could help me intergrate that javascript into my forum via the Radio Custom Tab made.
But to be honest, i just don't where to paste my javascript code so that when someone clicks on the Radio Custom Tab, the radio stations will pop up.
Could someone pls help me out?
Here's my js code:<script language="JavaScript">!--
function popUp {
window.popUp("Streams/Peacefm.html","Window1","menubar=no,width=470,height=490,toolbar=no,resizable=no,scrollbars=no");
}
/</script>
<p><a href="javascript:void();" onclick="win1(); return true;"> <b><img style="width: 98px; height: 30px;" alt="" src="custom.gif"><br>
</b></a>
Thnx.
PS: Am using the babylon theme 1.1.10
Solved! :D
Quote from: Chamaeleon on July 15, 2009, 11:19:16 AM
SMF 2.0 RC1-1 + SMF 2.0 RC1-2
Admin.php
Find
'profile' => array($txt['custom_profile_shorttitle'], 'enabled' => in_array('cp', $context['admin_features'])),
Replace with
'profile' => array($txt['custom_profile_shorttitle'], 'enabled' => in_array('cp', $context['admin_features'])),
'action' => array($txt['custom_action_shorttitle'], 'admin_forum'),
Works excellent!
Hi there !
It cannot be installed on RC2, are you working on an update?
Not to find in Sources/Admin.php
Quote'pruning' => array($txt['pruning_title']),
and
not to find in Sources/Subs.php
Quote$load_menu_js = false;
Quote from: c23_Mike on October 18, 2009, 04:06:15 PM
Hi there !
It cannot be installed on RC2, are you working on an update?
Not to find in Sources/Admin.php
Quote'pruning' => array($txt['pruning_title']),
and
not to find in Sources/Subs.php
Quote$load_menu_js = false;
SMF 2.0 RC2
Quote from: Chamaeleon on July 15, 2009, 11:19:16 AM
Admin.php
Find
'profile' => array($txt['custom_profile_shorttitle'], 'enabled' => in_array('cp', $context['admin_features'])),
Replace with
'profile' => array($txt['custom_profile_shorttitle'], 'enabled' => in_array('cp', $context['admin_features'])),
'action' => array($txt['custom_action_shorttitle'], 'admin_forum'),
Sources/Subs.php:
Find
// Now we put the buttons in the context so the theme can use them.
Replace with
// Any custom action buttons?
$ca_buttons = unserialize($modSettings['ca_menu_cache']);
foreach ($ca_buttons as $button)
{
$buttons[$button[0]] = array(
'title' => $button[1],
'href' => $scripturl . '?action=' . $button[0],
'show' => $button[2] ? allowedTo($button[2]) : true,
'sub_buttons' => array(
),
'is_last' => true,
);
}
// Now we put the buttons in the context so the theme can use them.
Where do i add the install.php to run it from my browser?
root folder or sources folder?
Quote from: BlueDevil on November 15, 2009, 10:06:37 AM
Where do i add the install.php to run it from my browser?
root folder or sources folder?
root folder
-------------------------------------
SMF 2.0 RC2
bevor open "install.php"
find
$smcFunc['db_create_table']('custom_actions', $columns, $indexes, array(), 'update_remove');
Replace with
$smcFunc['db_create_table']('{db_prefix}custom_actions', $columns, $indexes, array(), 'update_remove');
Quote from: Chamaeleon on November 15, 2009, 10:22:59 AM
Quote from: BlueDevil on November 15, 2009, 10:06:37 AM
Where do i add the install.php to run it from my browser?
root folder or sources folder?
root folder
-------------------------------------
SMF 2.0 RC2
bevor open "install.php"
find
$smcFunc['db_create_table']('custom_actions', $columns, $indexes, array(), 'update_remove');
Replace with
$smcFunc['db_create_table']('{db_prefix}custom_actions', $columns, $indexes, array(), 'update_remove');
I get this error:
Fatal error: Call to undefined function updatesettings() in /home/********/public_html/install.php on line 9
Reason i need to use the install.php simply because im trying to add this mod manually for RC2 but i found this in admin,
Table '********_smf1.smf_custom_actions' doesn't exist
File: /home/********/public_html/Sources/ManageSettings.php
Line: 2361
Install the Mod. with Packet Manager
then manually edit Admin.php and Subs.php
go into the database, search for "custom_actions" Table and add the prefix
edit:
Quote from: BlueDevil on November 15, 2009, 10:36:33 AM
Fatal error: Call to undefined function updatesettings() in /home/********/public_html/install.php on line 9
root of your Forum...same Folder of index.php, SSI.php........
If all these edits can make this mod work in RC2, it'd be really nice if someone packaged them all up into a new version of the mod which can be installed cleanly. :)
I think you should ask the author if you're allowed to edit and release the mod. ;)
Quote from: sremick on November 20, 2009, 02:55:45 PM
If all these edits can make this mod work in RC2, it'd be really nice if someone packaged them all up into a new version of the mod which can be installed cleanly. :)
I agree!
jpb
Quote from: sebtor on October 04, 2009, 09:37:00 PM
in HTML parse
external links made like this code :
http://www.astronomo.org/foro/"http://www.wikipedia.com/wiki/Procyon_estrella"
Can it be solved?
anyone idea ?
:'(
hi everyone, not sure if someone has already posted with this issue my eyes started going numb after scanning 10 pages of posts. lol
So I love this mod and it has been working great w/my html code, but once I add some php to my html and switched the code type to PHP I get the error below. Any help would be great
Parse error: syntax error, unexpected '<' in /home/content/j/c/l/jclawson01/html/forum/Sources/Load.php(1733) : eval()'d code(9) : eval()'d code on line 1
I am using version 1.1.11
And yes I get the same error when just attempting basic php code
I can get the custom action tab to show up, but when I click it i get this error? I change the coding in admin.php and subs.php.
Database Error
Table 'kalyra_smf.smf_custom_actions' doesn't exist
File: /home/kalyra/public_html/forum/Sources/ManageSettings.php
Line: 2221
When I go to features and options, then to custom actions, I get this error:
Table 'kalyra_smf.smf_custom_actions' doesn't exist
File: /home/kalyra/public_html/forum/Sources/ManageSettings.php
Line: 2221
What does this mean?
I am using curve, RC2 2.0
Thank you for this Custom Action Mod!
It is very necessary!
Quote from: Josh79 on February 04, 2010, 09:42:55 AM
When I go to features and options, then to custom actions, I get this error:
Table 'kalyra_smf.smf_custom_actions' doesn't exist
File: /home/kalyra/public_html/forum/Sources/ManageSettings.php
Line: 2221
What does this mean?
I am using curve, RC2 2.0
Read a few posts above!
Or, run this inside your myphpadmin or whatever you use:
ALTER TABLE custom_actions RENAME TO smf_custom_actions;
Hi :)
I've maked more pages thanks to this mod but now i've a small(?) problem with one of this: http://darkwolf.altervista.org/videovalidator/
I want test to translate in english and to see in Ita or Eng thanks to language drop down.
I've maked a php custom action and i've test to use some string from "index.english.php" but not work.
Is there any way to fix this problem?
-
Edit: ok, i've changed, in CustomAction.template.php
// Show a custom action.
function template_main()
{
global $context;
to:
// Show a custom action.
function template_main()
{
global $context, $txt;
and now i can use $txt['string_from_indext_emplate'] ;)
-
Edit: a new problem found today :/
I've an html page than contain link like this:
<a href="http://darkwolf.altervista.org/_altervista_ht/hwu/hwu_menu_forum.xpi">
it work fine but after first "save" (the page still continue to work with full link) the editor trunk link like this:
<a href="http://darkwolf.altervista.org/_altervista_ht/hwu/hwu_menu_.xpi">
and after a new "save" (eg: for a new custom action) it will corrupt
(i think it don't glad many "underscore" _ in url) :/
Anyone tested this on RC3 ????
anyone have a updated package to work with rc3 or do i have to manual edit files?
The mod is not tested for RC3 currently. I will update it as soon as possible.
Can't wait to try it! I found a tinyportal (linked to a page their in a google search) script that will embed wikipedia into your site! http://www.tinyportal.net/index.php?topic=4713
It installed successfully on RC3, but had to emulate last version this was made for. I went to mod page and found where mod page in admin was, and no admin menu item was added!!
Quote from: Kcmartz on April 22, 2010, 09:10:15 PM
It installed successfully on RC3, but had to emulate last version this was made for. I went to mod page and found where mod page in admin was, and no admin menu item was added!!
I found the admin menu option, it's under "Features and Options." Move your mouse a bit to the right of "Profile Fields", and you'll see the hover effect, with no text within it. The entire admin page is one giant malfunction.
EditHmm, the problem really seems to be with the language files. For instance, my forum is installed with English-UTF8, while the mod only installs to English. I just made the same changes to English-UTF8 as were made to English (keeping a careful eye on converting to UTF-8 without BOM).
This really needs to be updated for RC3. Very useful, I used this before RC3 on 1.1.11 and have now lost all my custom actions.
Quote from: Norv on April 11, 2010, 07:00:22 PM
The mod is not tested for RC3 currently. I will update it as soon as possible.
I'll do your laundry if you do...
Please?
Norv, I wonder, how do you add a sub-action, can't figure it out....
Hey all,
My first post, but i managed to get this mod going on
smf 2.0-rc3.
All that is need to do is two things,
First add the button under admin.php and the fix up that database table.
Changes in Admin.php
Find this line:
'profile' => array($txt['custom_profile_shorttitle'], 'enabled' => in_array('cp', $context['admin_features'])),
Add under line:
'action' => array($txt['custom_action_shorttitle'], 'admin_forum'),
Changes in Database:
Done with phpMyAdmin (don't ask how to use it please)
You will find in that database that it is listed as
"custom_actions"
You need to open the table then select the "Operations"
tab to edit the table name.
"smf_custom_actions"
This is all i have done to get this mod working.
Yet to make an action tab i must say,
so will post back if it 'fails'
#| EDIT.
Ok just worked out how to use it and it is working fine,
not what I'm looking for tho ::)
Only problem i know of and that is it will not auto add a tab to your
tabs up top as it doesn't put a line in your Subs.php
So all you can just manually add in the tab into your Sub.php file,
as you will get the address code form the page when making it.
I'm not interested in finding out how to get it working in auto.
I would be adding it in like i said above.
Hope this will help you.
Quote from: Raw-Raven.co.nz on May 30, 2010, 03:06:43 PM
Hey all,
My first post, but i managed to get this mod going on
smf 2.0-rc3.
All that is need to do is two things,
First add the button under admin.php and the fix up that database table.
Changes in Admin.php
Find this line:
'profile' => array($txt['custom_profile_shorttitle'], 'enabled' => in_array('cp', $context['admin_features'])),
Add under line:
'action' => array($txt['custom_action_shorttitle'], 'admin_forum'),
Changes in Database:
Done with phpMyAdmin (don't ask how to use it please)
You will find in that database that it is listed as
"custom_actions"
You need to open the table then select the "Operations"
tab to edit the table name.
"smf_custom_actions"
This is all i have done to get this mod working.
Yet to make an action tab i must say,
so will post back if it 'fails'
#| EDIT.
Ok just worked out how to use it and it is working fine,
not what I'm looking for tho ::)
Only problem i know of and that is it will not auto add a tab to your
tabs up top as it doesn't put a line in your Subs.php
So all you can just manually add in the tab into your Sub.php file,
as you will get the address code form the page when making it.
I'm not interested in finding out how to get it working in auto.
I would be adding it in like i said above.
Hope this will help you.
I tried tinkering with this for a couple of days.
No luck.
Has anyone else had any successs?
I offer a 10 dollar ransom for this hostaged mod to be updated for SMF 2.0 RC3.
Anyone else?
Hello all,
I will put up a link to show you the custom action i have
made with the mod.
http://www.renegadesatwar.net/home/index.php?action=custom_action_test
Check the database to see if i has made the Table,
as after i made the link it said it was having problems
with Tables not existing, and that's when i found the
Table had been entered wrong.
It is a very good mod, but it is not what i wanted as
all of your page Code is kept in the Database Table.
Hope you get it working as well.
Thanks, Raven.
Okay. I see it works on your forum.
I couldn't get it to work, and I didn't have a table called smf_custom_actions
May I ask you to please run through exactly what you did, step by step?
Need RC3 PM me and send your email.
You've got mail...
Hey all,
Probably going to get my profile banned
for this, but anyways here is what you guys have
been wanting.
I will be keeping this link active for a week or
less if requested by SMF/or Mod persons.
Custom Action Mod For 2.0RC3 (http://www.raw-raven.co.nz/downloads/Custom_Action_Mod/customaction_2.0RC3.zip)
This is only for RC3 and has only been tested on RC3.
I hope you enjoy.
Thank you Raw-Raven, and Mave. Your help is appreciated, and by no means will get anyone banned. :)
I meant to update the mod on the site and change license to it, so that you don't need anything to take it over if you wish (including anyone's approval), or update it or share it when you want. I will try to do so as soon as possible, unless the sky falls tomorrow or the day after. :)
Quote from: Raw-Raven.co.nz on June 02, 2010, 07:10:01 PM
Hey all,
Probably going to get my profile banned
for this, but anyways here is what you guys have
been wanting.
I will be keeping this link active for a week or
less if requested by SMF/or Mod persons.
Custom Action Mod For 2.0RC3 (http://www.raw-raven.co.nz/downloads/Custom_Action_Mod/customaction_2.0RC3.zip)
This is only for RC3 and has only been tested on RC3.
I hope you enjoy.
Works
(touching tips of fingers to mouth and kissing) purrfect!
Glade it works for you.
*Scratching my Head*
With the mod all I've done with it was change the
way some things where coded and didn't bother
to credit myself, and don't want any.
Only did it for the peoples that where having trouble with it
and it is a nice mod.
I believe that i will use it and just use all includes on the
pages to reduce the size of my database.
Its a shame it don't make new pages ;D
Quote from: Kcmartz on May 29, 2010, 10:52:24 PM
Norv, I wonder, how do you add a sub-action, can't figure it out....
OMG that one took me ages!!!! :P
Under the "Sub-Actions" column, find the action you want to
make sub actions for and select that number "0"
It will then open up to the Adding sub-actions page!
Its a hard one!!!
This is by far my favorite mod. Thank you. Very easy to use. Appreciate all the hard work on this.
any update plz...
Quote from: Raw-Raven.co.nz on June 03, 2010, 07:16:19 PM
Quote from: Kcmartz on May 29, 2010, 10:52:24 PM
Norv, I wonder, how do you add a sub-action, can't figure it out....
OMG that one took me ages!!!! :P
Under the "Sub-Actions" column, find the action you want to
make sub actions for and select that number "0"
It will then open up to the Adding sub-actions page!
Its a hard one!!!
It would be easier if it was a "+" or someting like that with the number of subactions as well!
Hey i tried the:
http:www.raw-raven.co.nz/downloads/Custom_Action_Mod/customaction_2.0RC3.zip
zip file. I still get the damn error. the button to add a action: [] is what it shows. dammit!
EDIT:
How do I remove the database tables without going into PHPmyadmin? what are the table names?
EDIT 2:
What is the SQL query for custom_actions? I deleted DB table and then deleted mod, then reinstalled mod. NO ERRORS for install, and looked and no DB table was made.
Sorry to bump so soon. This mod is a must for my website! I don't want to do a fresh install for the 20th time unless I have to...
1.
hey, does anyone know why I get this error:
Not Acceptable
An appropriate representation of the requested resource /forum/index.php could not be found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
when I'm trying to delete a block. And can it be deleted manually, if nothing helps.
2. Also, why, when I set block to be php, and input this : <?php include("/home/ameo/public_html/pulse/blocks/skyline.html"); ?>
I get Parse error: syntax error, unexpected '<' in /home/ameo/public_html/forum/Sources/Load.php(1733) : eval()'d code(9) : eval()'d code on line 1
Quote from: Dark-Wolf on March 30, 2010, 05:17:06 PM
I've maked a php custom action and i've test to use some string from "index.english.php" but not work.
Is there any way to fix this problem?
-
Edit: ok, i've changed, in CustomAction.template.php
// Show a custom action.
function template_main()
{
global $context;
to:
// Show a custom action.
function template_main()
{
global $context, $txt;
and now i can use $txt['string_from_indext_emplate'] ;)
I would love this, but the buttons on the page have no text in it, for one, and when I click them nothing happens.
Kcmartz: Please, try the last version.
Dark-Wolf: Sorry for the delay. Good to see you worked it out, and thank you very much for sharing it. :)
ameo: it sounds like mod_security is installed on your host's Apache server. Maybe contacting them and telling them the URL causing the problem would help them identifying the rule and eventually making an exception.
Nice mod! But where does it store the code? MySQL? Or does it create a file somewhere?
I just can't stand having to add PHP code to a tiny text box rather than editing a file (which would be easier). Any alternatives?
EDIT: I'll just call to a function specific to each action inside the code box and create a php file with all the functions (hence editing files instead of using these small text boxes lol)
When will this have support for RC4? I am waiting until my main modifications (the important ones) have RC4 support before I upgrade. This is holding me back.
Sorry for double post. I installed no errors, and looks fine on RC4!!
Thank you for the feedback. I didn't have time to test it too, but will do.
no problem glad to help!
********n phone. please delete all but post above this**
**please delete, see below post**
**please delete, my phone sometimes double submits forms**
Kcmartz, stop this :(
Hi,
I really love this mod!!! Its making my life so much easier!
I'm having some trouble linking to a photo gallery though. I don't know any php at all and somehow I managed to get this photo gallery installed but I can't figure out how to link to it through the mod.
http://www.wararmada.com/screenshots/index.php
The screenshots folder is in the public-html folder with the rest of my SMF stuff.
Thanks for any help.
Sorry another question.
If i want to display a custom page as the home page do i need to instill the forums in a sub folder?
Thanks
Never mind, I stopped using this.
How do i add sub actions?
I'm trying to add dropdown links to my overvew button.
I'm going to
http://www.wararmada.com/smf/index.php?action=overview;sa=""""The name I want to use on the button"""""".
and the page is not found.
I've tried adding a page using them info but it tells me
QuoteAction URLs may only contain letters, numbers and underscores.
The code i've been trying to use to add the sub action is
overview;sa=corpmerger
Thanks for the help!
works fine in RC4. No need to emulate, either.
I installed it on 1.1.12 .. it passed all tests and got installed.
Now I don't see any link in Features and Options other than
Basic Features | Layout and Options | Karma
How to fix this ?
Oh I'm sorry.. I reinstalled and got it working.
my html and bbc stuff have disappeared lately for some reason i dunno(i checked everything in the forum posting admin section)
im afraid of installing this as a "solution" for my current problem, but can this help? btw i got this during install, is this a green light?(rc4)
1. Adapt Database install.php
2. Extract File ./Sources/CustomAction.php
3. Extract File ./Themes/default/CustomAction.template.php
* 4. Execute Modification ./Sources/ManageSettings.php Test successful
1. Replace ./Sources/ManageSettings.php Test successful
2. Replace ./Sources/ManageSettings.php Test successful
3. Add Before ./Sources/ManageSettings.php Test successful
* 5. Execute Modification ./Sources/Admin.php Test successful
1. Add Before ./Sources/Admin.php Test successful
* 6. Execute Modification ./Themes/default/languages/Modifications.english.php Test successful
1. Add Before ./Themes/default/languages/Modifications.english.php Test successful
7. Execute Modification ./Themes/default/languages/Modifications.german.php Skipping file
8. Execute Modification ./Themes/default/languages/Modifications.german-utf8.php Skipping file
* 9. Execute Modification ./Sources/Subs.php Test successful
1. Replace ./Sources/Subs.php Test successful
* 10. Execute Modification ./index.php Test successful
1. Replace ./index.php Test successful
* 11. Execute Modification ./Themes/default/Admin.template.php Test successful
This won't help with the problem you are having.
Though I don't see anything bad in the test results.
do you have an idea what made my editing options in bbc or html have gone?
Quote from: ggman on December 22, 2010, 09:11:40 AM
do you have an idea what made my editing options in bbc or html have gone?
I absolutely have no idea.
Maybe upload a fresh Post.Template.php to your Themes/Default folder.
Warning: This will remove all BBC editing options from the menu.
This is a WONDERFUL mod! I'm using it and having a blast with it!
Quick question though - how do the sub-actions work? I made one and can't seem to be able to find out how to get to it.
Quote from: Andrew94 on December 27, 2010, 10:57:46 PM
This is a WONDERFUL mod! I'm using it and having a blast with it!
Quick question though - how do the sub-actions work? I made one and can't seem to be able to find out how to get to it.
I didn't see anyone to have them working, though.
I figured it out, it's ;sa=subaction
Example:
http://youwebsite/index.php?action=firstaction;sa=subaction
I have a request. I took over a site for someone who unfortunately is no longer with us. The site uses simpleportal and has a menu block on the left hand side with all kinds of things in it. One of the things I need help with are some navigation links that were created using a custom action, unfortunately that custom action got lost in a server crash and I have no idea how to recreate it. What I am trying to do is create links that my users can use to get to "Topics - Last 50", "Topics - Last 24 hrs", "Topics - You're Watching", "Topics - You've Bookmarked", and "Topics - Unreplied". This is the code I have in the simpleportal block:
global $context, $settings, $options, $scripturl, $txt, $modSettings, $user_info, $db_prefix, $smcFunc;
// Shows for everybody
echo '<a href="', $scripturl, '?action=links">Links</a><br />';
echo '<a href="', $scripturl, '?action=contact">Contact Webmaster</a>';
// Guests
if ($user_info['is_guest']) {
echo '<center>';
echo '<strong>Registration requires a <u>valid</u>, <u>active</u> email address!!!</strong><br />';
echo '</center>';
echo '<hr>';
}
// Logged in Users (with one line checking for membergroup 13)
if (!$user_info['is_guest']) {
echo '<a href="', $scripturl, '?action=dxrecent;style=full;type=last">Topics - Last 50 </a><br />';
echo '<a href="', $scripturl, '?action=dxrecent;style=full;type=hours">Topics - Last 24 hrs</a><br />';
echo '<a href="', $scripturl, '?action=dxrecent;style=full;type=notify">Topics - You\'re Watching</a><br />';
echo '<a href="', $scripturl, '?action=dxrecent;style=full;type=bookmark">Topics - You\'ve Bookmarked</a><br />';
if (in_array(13, $user_info['groups'])) {
echo '<a href="', $scripturl, '?action=dxrecent;style=full;type=unreplied">Topics - Unreplied</a><br />';
}
// Admin only
if ($user_info['is_admin']) {
echo '<a href="', $scripturl , '?action=admin;area=viewmembers;sa=browse;type=activate', '">', sprintf($txt['admin_browse_awaiting_activate'], $context['awaiting_activation']), '</a><br />';
}
The custom action in question in this case is "dxrecent". Would someone be able to tell me how to create this action from seeing how it will be used?
ok i tried putting a url in the html headers and i noticed the title became a button and went to the action(webpage) i wanted it to, what do i put in the action url? "Action URLs may only contain letters, numbers and underscores." i keep getting this argh i keep getting taken to the index page asldfksd;kfhasofskodf
how does one put a sub action? can anyone here give an exampe?
bump
Quote from: eyo on January 03, 2011, 07:58:27 PM
how does one put a sub action? can anyone here give an exampe?
Go to Custom Actions under features and options. You should there see:
Action Name | Type | Sub-Actions | Enabled | Modify
There will be a number (0+) underneath Sub-Actions, click it to make your sub-action for the primary action.
i dont see any sub-actions option anywhere only actions :(
does this mod allow only admins to add the bbc code?
had this problem
Fatal error: Cannot redeclare template_show_custom_action() (previously declared in /home/nbathrea/public_html/Sources/Load.php(2144) : eval()'d code:2155) in /home/nbathrea/public_html/Sources/Load.php(2144) : eval()'d code on line 2296
Quote from: kingkingston on January 24, 2011, 05:14:02 AM
had this problem
Fatal error: Cannot redeclare template_show_custom_action() (previously declared in /home/nbathrea/public_html/Sources/Load.php(2144) : eval()'d code:2155) in /home/nbathrea/public_html/Sources/Load.php(2144) : eval()'d code on line 2296
Can you post your Load.php file, please?
No. That's an evaluation error.
Quote from: Masterd on January 30, 2011, 05:34:31 AM
No. That's an evaluation error.
So? It's still an error that needs to be fixed.
Can anyone tell me how I can embed another website within the code space? Would I use "html" and what code would I have to use?
Quote from: shuban on April 18, 2011, 10:05:12 PM
Can anyone tell me how I can embed another website within the code space? Would I use "html" and what code would I have to use?
Well that's basic HTML knowledge that is beyond the scope of mod support here. But you can use an iframe. It can also depend on the target site, they might have code specific for embedding their content.
I don't believe this, you guys are php gurus and you no one can give me instructions on how to embed another website into the space provided? :o :-[
Hey, Shuban:
<iframe height="410" width="100%" frameBorder="0" src="http://www.YOUR-WEBSITE">your browser does not support IFRAMEs</iframe>
Use that. Just put it in the HTML BODY section of the custom action mod.
No need to do anything with the HEADERS part of the mod.
Make sure it's HTML (type).
You should be good to go.
Hope that helps.
Quote from: Scratching my Head on April 20, 2011, 10:54:22 PM
Hey, Shuban:
<iframe height="410" width="100%" frameBorder="0" src="http://www.YOUR-WEBSITE">your browser does not support IFRAMEs</iframe>
Use that. Just put it in the HTML BODY section of the custom action mod.
No need to do anything with the HEADERS part of the mod.
Make sure it's HTML (type).
You should be good to go.
Hope that helps.
Scratching my Head, you're incredible. Thank you :)
Sure.
Very nice mod!
For new version i have one idea:
Add group permission for edit pages from Custom Actions
Thanks!
Did anyone try this on RC5 ?
It's working without any problems on SMF 2.0 RC5.
Great thanks :)
No problem! ;)
Tremendous Mod. Thanks very much.
I have just moved my forum to a new server, and everything seems to have transferred fine. But when I went to edit the Custom Actions Page I get a "You do not have permission" error message. Any ideas what might be causing that?
Version 1 of SMF, btw.
Cheers
does it run with 2.0 gold ?
Yes, it works without any problems.
Quote from: firechild on June 05, 2011, 06:54:23 AM
Tremendous Mod. Thanks very much.
I have just moved my forum to a new server, and everything seems to have transferred fine. But when I went to edit the Custom Actions Page I get a "You do not have permission" error message. Any ideas what might be causing that?
Version 1 of SMF, btw.
Cheers
No thoughts on this?
Quick question for you. I'd like to call SSI and other variables inside of a custom action so that I can grab someone's name or check if they are logged on, etc. Is this possible? The code in question:
echo '<iframe width="100%" height="600" src="http://widget.mibbit.com/?settings=4f9c0ee511c70e93a60faa57c6d7ba77&server=otherworlders.org&channel=%23thecbg&nick=' . $user_info['username'] . '"></iframe>';
I originally assumed that as the actions are called inside the main index page which already includes those variables that I could just pull them out however that doesn't seem to be working. Additionally when I try to include SSI.php inside the action itself it creates an error. Is it possible to do this? Essentially the purpose here is to have it so that if they go to the IRC page they get a mibbit chat window with their username already in the nickname box ready to go. Once this is working I'd also like to use those variables to run a check on whether or not they are logged in (and if not give them a "you must be logged in" message).
Can someone help with ther error I mention in this post.
http://www.simplemachines.org/community/index.php?topic=443537.0
I believe it to be related to this mod.
Can somebody give me an example of using this mod to update an existing table using values from a form? The mod works great for me to display query results from a table (a schedule), but I can't figure out how to display a form with a submit button which runs an update query on a specific record. Say for example that I show the schedule for a Monday and I want to update the time that lunch is scheduled?
I think I'm pretty close to doing what I want, but I'm stuck. If somebody could show me some example code to do this, I'd really appreciate it!
Hi,
I want to create a custom BBC tag. Is it possible using this mod? also could someone give me a quick example of how to create a custom bbc tag using this mod?
Thanks
I'm not sure if this mod will help me or not...
I am trying to create a theme select and would love to be able to install it as a mod, added to template but I will settle for a manual file edit that won't wreck my forum like I almost did already....I know very little about coding, just enough to be a danger to a perfectly running site... ;D
This little js form works and changes my themes on SMF2.0 latest vers. but I need help to add it to my template...I have tested it in add management, custom box, header mod ect., but I want to add it to the very bottom left of template without relying on poorly postioned ad mod to place it.
Anyway here is the js form button that I want on my templates at the bottom left corner -->
Thanks in advance for any help you may be able to offer.
Running SMF 2.0 latest vers. w/Curve themes
<SCRIPT LANGUAGE="javascript">
function LinkUp()
{
var number = document.DropDown.DDlinks.selectedIndex;
location.href = document.DropDown.DDlinks.options[number].value;
}
</SCRIPT>
<FORM NAME="DropDown">
<select name="DDlinks">
<OPTION SELECTED> - Theme -
<option value="url/w_action(see_last_option)"> my Theme#1 here
<option value="url/w_action(see_last_option)"> my Theme#2 here
<option value="url/w_action(see_last_option)"> my Theme#3 here
<option value="url/w_action(see_last_option)"> my Theme#4 here
<option value="url/w_action(see_last_option)"> my Theme#5 here
<option value="url/w_action(see_last_option)"> my Theme#6 here
<option value="url/w_action(see_last_option)"> my Theme#7 here
<option value="http://mysite.com/forum/index.php?action=my_action;my_theme=#here
"> Green
</select>
<INPUT TYPE="BUTTON" VALUE="Click to Go!" onClick="LinkUp()">
</form>
Thanks
Anybody ?
When I move this code in SUBS.php:
// Any custom action buttons?
$ca_buttons = unserialize($modSettings['ca_menu_cache']);
foreach ($ca_buttons as $button)
{
$buttons[$button[0]] = array(
'title' => $button[1],
'href' => $scripturl . '?action=' . $button[0],
'show' => $button[2] ? allowedTo($button[2]) : true,
'sub_buttons' => array(
),
'is_last' => true,
);
}
before or after e.g. forum tab I have "sytanx" error. Anybody knows how move those custom tabs around ?
Lol
I supported my self - little bit around but it works. So whoever will have an issue like me:
1. create a custom action
2. in options of custom action mod - un-tick "show the button"
3. separately go to subs.php and create manually extra button
4. use the action created previously as href
Thank you for support :)
Has anyone modded this Mod to get it to work with the Package Manager for SMF 2.0.1? Or is manual installation the only option?
On your forum, go to Admin -> Package Manager -> Browse Packages
Once there, scroll to the bottom, click the "advanced" link, change the version to an earlier version, e.g. SMF 2.0, or SMF 2.0 RC5. Click the "Apply" button and try reinstalling the mod. This should work. Make sure when you are done you revert your settings back to the default.
Thanks for the reply but I have already tried that option. It doesn't appear as though this mod is configured to work with the Package Manager?
emulate SMF 2.0 RC4 - see if that works for you. Or you could open up the zip file for the package, then edit package-info.xml, find all instances of this:
install for="2.0 RC4 - 2.0.99"
and replace it with:
install for="2.0.1"
Then zip it all back up and try again, with your emulator reverted back to default
Okay cloksin, I will give it a try. Thanks!
EDIT: That did it. Thanks again cloksin.
This mod is cool. I have a BBC action working. Now what do I have to do to get a PHP action working?
The PHP code I have is good. I coded a simple action and template by hand and it tests good. But using the same code in the Custom Action Mod doesn't work. I'm sure its something simple with the PHP wrapper code maybe? I just haven't found any good instructions or samples to follow.
Help?
EDIT: Okay, got it working. Have to leave out the SMF specific code.
Making Link Tree work with Custom Action Mod.
I thought about setting this up by extending this mod but I tested it out in the mod's code window for a new action and it works.
Maybe I should find a need before trying to fulfill it but since I had a bit of a trial-and-error session myself, here it is.
In the Source File Code window:
$context['linktree'][] = array(
'url' => $scripturl. '?action=test_php',
'name' => 'TestPHP',
);
the action=youraction should be easy enough to understand;
the name 'TestPHP' can be anything you want it to be.
This also works with subactions. You will need to copy the above code into your Source File Code window and another version of it for the sub-action.
See the code below:
$context['linktree'][] = array(
'url' => $scripturl. '?action=test_php',
'name' => 'TestPHP',
);
$context['linktree'][] = array(
'url' => $scripturl. '?action=test_php;sa=subtestphp',
'name' => 'SubTestPHP',
);
An anchor link to the sub-action in the Template Code section of your custom action:
echo '
<a href="index.php?action=test_php;sa=subtestphp">Go to Sub-action test.</a>
';
Hopefully this helps someone. I had to go through a long process of hand-crafting a custom action to understand how all of the parts worked.
Custom Actions with Link Tree. Cool way to go.
There is some error in package
customaction3.2.zip, when I try to download it through 'Package Manager' it throws out error:
But when I repack it to *.zip and download it then it works.
I'm wondering if anyone can help me figure this out. I am trying to use the custom action function to add some calculators to my site. In the head area, I had the script source, and in the body, I add the code to follow. What happens after I save it, is that part of the code, actually becomes part of the custom actions page, and I can not modify, or delete the custom action. The page works, but it breaks the mod. I have to go into PHPMyAdmin and delete the custom action from the custom actions table.
I tried it without putting the script in the head, and it does the very same thing. I'll attach the code that breaks the mod, and also a screen shot for you to see what is happening. I'm guessing this could be considered a bug. What to look for in the screenshot is under the post box, part of the form becomes part of the mod page, rendering it inoperable.
<form name="spec">
<input type="text" name="depth" size="2"> Thickness in inches
<input type="text" name="width" size="2"> Width in inches
<input type="text" name="length" size="2"> Length in feet<br>
<input type="text" name="piece" size="2"> Number of pieces
<input type="text" name="Bpackage" value="1" size="2"> Number of packages*
<input type="text" name="cost" value size="4"> Price per/Mbf<br>
</font></p>
<p align="center"><font face="Arial" size="2"><small>*If package number
is not applicable, leave number at 1</small><br>
</font></p>
<div align="center"><font face="Arial" size="2">
<input type="button" name="answer" value="Calculate and add lumber to total" onClick="updateAnswer();">
<br>
<br>
Lumber entered list:<br>
<textarea name="list" cols="50" rows="2"></textarea>
<br>
Total board footage:
<input type="text" name="answerTotal" value="0" size="10">
Total Price $
<input type="text" name="price" value="0" size="5">
<input type="button" name="Confirmreset" value="Reset" onClick="if( confirm('Are you sure you want to reset?') ) {resetFormData(); }">
</font></div>
</form>
I suspect that the mod incorrectly interprets the </textarea> tag as the end of its own <textarea> where you enter your code rather than the end of the <textarea> in your code.
Try temporarily removing <textarea name="list" cols="50" rows="2"></textarea> from the code and see if it helps.
You could also try replacing </textarea> with </textarea>
Yup, that is the culprit, however </textarea> does not seem to be the answer. It renders the calc inoperable.
The custom action page performs just fine once created, its just the only way to edit or delete it is within phpmyadmin. :-\
The mod adds the line below to Themes/default/Admin.template.php, (line 2323 in my version).
<textarea name="body" rows="20" cols="60">', $context['action']['body'], '</textarea>
If that line is replaced with
<textarea name="body" rows="20" cols="60">', htmlspecialchars($context['action']['body']), '</textarea>
it seems to work.
Excellent! Seems to work perfectly. Thank you very much. :)
SMF 2.0.1, Custom Action 3.2
I have some scripts (complete programs, like chess, checkers, etc.) I'd like to run via Custom Action, but some have their own log in, and others don't.
I'd like the scripts to be run using the SMF user system automatically, like a separate mod, I guess.
Would the code in the following quote help, or is there more to it?
Quote from: worm82075 on March 17, 2008, 08:47:48 AM
Awesome Mod, works like a charm, so I have no problem with it's function, my question is about it's use.
Ok, I have archived another site and what I'm working with is about 370 static html pages with css formating. I can see the ability to add the existing code to custom actions editing all links to point to those actions there by integrating the static set into my 1.1.4 SMF forum and it acting as it did before accept it will be surrounded by my header and footer. Ok, that is nearly perfect except I don't want to let guests have access to those actions. From what I've gathered from this thread is that making the action Php rather than Html will give me the ability to put a user check in every action. While I am fairly proficient with html I am not very familiar with Php as of yet. I have a deadline to meet on the construction of my site otherwise I would just be learning Php and doing this on my own.
My question is this, Is it possible for me to create the action as php, giving me my user check and then have it parse Html code to construct the page. Or alternatively is there a program available that can convert my html code to php.
Any help concerning the possession and regulation of standard html code by SMF would be appreciated. From what I gathered so far in the past 24 hours scouring this site for anything related to this subject is all the solutions in involve transforming my html code to php. Alright well there you have it, I'm sure someone here can enlighten me as to all my options so I can then decide what the best course of action will be.
Thanks.
Jeremy aka Worm
EDIT:I have located a program to convert my html to php and it works!
So all I really need now is a snipet to place at the beginning of my code to dis allow guests.
EDIT 2:ok, I managed to scrounge the first part and it works right
if ($context['user']['is_guest'])
echo "You <FONT color=#ff0000><b>MUST</b></FONT> be a registered member of this site to enter this archive.<BR><BR><BR>";
else
i just need to be able to kill it at this point if guest checks true
EDIT 3: Well that didn't take much time
if ($context['user']['is_guest'])
die('Direct Access to this location is not allowed.');
else
I have been at this site at least a half a dozen times for help. This is the first time I actually posted thinking what i needed wasn't here. Just took me a little longer to find it this time thats all. Leave it to a bunch of forum creators to set the example of how to run a tight ship. Thanks
Quote from: DanCarroll on October 25, 2011, 01:58:12 PM
Hopefully this helps someone. I had to go through a long process of hand-crafting a custom action to understand how all of the parts worked.
Custom Actions with Link Tree. Cool way to go.
Cool way indeed, very useful, could a link to this be added to the first post? Save others from searching through the pages for the useful bits.
Thanks ;)
Done, thanks for the feedback, geek_andy.
And in particular, thanks to DanCarroll for the time spent on it and for sharing his experience.
This mod works great!
I have a question though that I hope someone can answer for me.
This is what I have in the 'body' part:
<iframe src="http://webchat.nightstar.net/?channels=darkwaters&uio=d4" width="647" height="400"></iframe>
My question is, what do I add to this to have it a popup window instead of being in the forum page?
I want to use this mod to add as custom action an application made with zend framework. Can this be done?
Can anyone please share a quick solution or post some related "reading" material?
I installed this mod and made a test page, but when I go to it I get the following error in my error log.
8: Undefined index: level
File: /homepages/13/xxxxxxxxxx/htdocs/xxxxx/community/Sources/menu_source/resources/main.php
Line: 994
Any ideas?
If it helps, line 994 of that file is as follows:
if (!empty($temp['strstr'][$key]) && $temp['strstr'][$key] == $context['current_action'] && $value['level'] == 0)
I want to add an imprint to my forum as required here in good old germany :-\
I read that this should be easy to achieve with this tool (otherwise I need to update all themes as it seems).
I got an imprint as .php-file - how can I do this now?
Can I chose type = PHP and do an
include 'myfile.php';
in the Source File Code-field? Do I need to define an Action URL? I think I don't need it, I just want a new menu entry in the main menu...
A simple tutorial would be quite useful, is there maybe some that I haven't found?
edit:
Got it:
Hey UNeverNo,
Does the script output something? If so, put it in the template box.
Just place it like this:
<?php
// $boarddir contains the path to the SMF directory, so perhaps it's /var/www/smf
global $boarddir;
include 'MyFile.php';
?>
Good luck!
hi
i get this error when i submit my custom action
Quotedatabase error:
Unknown column 'permissions_mode' in 'field list'
file: C:\AbyssRoot\htdocs\Forum\Sources\ManageSettings.php
line: 2396
can anyone help?
**EDIT:fixed it. smf_customaction table didn't have the permissions_mode column and i added it manually
Quote from: Andrew94© on December 28, 2010, 11:51:39 AM
I figured it out, it's ;sa=subaction
Example:
http://youwebsite/index.php?action=firstaction;sa=subaction
I found this, too. But why doesn't appear it as a sublist like under "admin", members" etc.?
hello.
Ive tried a search but can get my answer.
I have installed the mod with no errors and it works, Thank yuo for it.
Can I use it with existing actions? (as an Easy way of adding button to the menu)
thanks
Hello,
Is there a way to know the number of views a page with Custom Action Mod has?
thanks
You'll have to code a custom ticker for that, I'm afraid.
Quote from: Yoshi2889 on October 13, 2012, 06:08:16 AM
You'll have to code a custom ticker for that, I'm afraid.
thanks for replying. Sadly, I know nothing about coding.
I'm sure someone is able to assist you with this, try posting in the Help Wanted board.
This may be a bum question. When I make a new PHP action. Do I have to add the PHP tags for both the source and the template.
Thanks
Quote from: tMicky on October 12, 2012, 02:40:16 PM
Hello,
Is there a way to know the number of views a page with Custom Action Mod has?
thanks
Micky, If this is what you want to do. I would just go all the way, Using PHP code. in your source. You could keep track of every one that runs the action.
So create a new table. and add these fields
id => (int)(11) //Record id
u_id => (int)(11) //Users ID
u_name => (string)(50) //Users Name
u_views => (int)(11) // Count the number of time this user ran this action
u_date => (int)(25) // Update the date and time the user ran the action
Then every time the user ran this action. Update the record. If no record is fount. Then create a new record.
Then create a new sub action, and call it sa=actionAdmin and this is where you could see the results of who entered the action and now many times the users ran the action.
Quote from: bigjoe11a on October 31, 2012, 04:04:52 AM
This may be a bum question. When I make a new PHP action. Do I have to add the PHP tags for both the source and the template.
Thanks
No php tags in either source or template.
Cool, Thanks
Quote from: bigjoe11a on October 31, 2012, 04:11:34 AM
Quote from: tMicky on October 12, 2012, 02:40:16 PM
Hello,
Is there a way to know the number of views a page with Custom Action Mod has?
thanks
Micky, If this is what you want to do. I would just go all the way, Using PHP code. in your source. You could keep track of every one that runs the action.
So create a new table. and add these fields
id => (int)(11) //Record id
u_id => (int)(11) //Users ID
u_name => (string)(50) //Users Name
u_views => (int)(11) // Count the number of time this user ran this action
u_date => (int)(25) // Update the date and time the user ran the action
Then every time the user ran this action. Update the record. If no record is fount. Then create a new record.
Then create a new sub action, and call it sa=actionAdmin and this is where you could see the results of who entered the action and now many times the users ran the action.
thanks for replying, but where and how do I do this?
Hello i installed the plugin and it works great but my question is , HOW CAN I PUT NOW THE BBCode so when i write [warning]{TEXT}[/warning] It gonna come with the design in topic
Soo now this is the new Options that is displayed to me Admin Panel.
And i want to add this code BBC:
In usage add:[warning]{TEXT}[/warning]
In HTML add:<table width="90%" style="border-top: 1px dotted #a3a3a3; border-bottom: 1px dotted #a3a3a3; border-right: 1px dotted #a3a3a3; border-left: 3px dotted #b9b9b9; font-family: arial, sans-serif; font-size: 12px;">
<tr style="background: #bd0100;">
<th align="left" style="border-bottom: 1px dotted #a3a3a3; background: #bd0100; color: #FFF; padding-left: 2px;"><em>KUJDES</em></th>
</tr>
<tr>
<td style="background: #fef2f4; padding-left: 20px;">{TEXT}</td>
</tr>
</table>
I've read, and digested, 580 posts in 30 pages for this splendid mod.
And yet, just to prove that I'm the world's worst "user", I cannot get it out of my head that there's something simple I'm missing with it.
I thought that creating a custom action with an enabled button, would put that button on the menu. Yep, it sure does :)
I also thought that creating sub-actions subservient to that custom action would give that button a menu of its own when clicked. Nope, it doesn't :(
And that's where I seem to be missing the point, or have I mis-installed this on my 2.0.2 installation?
Are these sub-actions really only accessible via URL (action=xx;sa=yy) or should they indeed appear within the new menu button?
I'm off for a tab...
A tedious bump, now I've finished my tab...
Quote from: Shambles on December 12, 2012, 03:36:29 PM
Are these sub-actions really only accessible via URL (action=xx;sa=yy) or should they indeed appear within the new menu button?
I'm off for a tab...
If you have made any mistake with the installation then I have made the same one.
But I don't think a button menu for sub-actions is implemented.
Quote
If you have made any mistake with the installation then I have made the same one.
I've made no mistakes with the installation.
Quote
But I don't think a button menu for sub-actions is implemented.
That's the question I've been asking. Unless I've missed something, I can't see how a subaction would be useful, other than via a URL accessible via some method other than a button 'dropdown'.
Shame, as the mod author is active on sm.org but chooses not to get involved here :-\
thanks but how will i know what to add??
please give me examples of things to add on either bbc or html?
does this work like css
thanks
fail...............................help please
problem solved
http://www.simplemachines.org/community/index.php?topic=86793.msg3230017#msg3230017
Anyone know if it's possible to use this mod to make a button (similar to reply/quick reply etc...), to accept/decline applications (a clans forums) and move the member to a user group?
Dang, I've been using this mod since forever and just realized when guests see these custom action pages, it shows "unknown action" in who's online.
I guess I'll try to figure out how to fix this so it shows the page name instead.
Hello again ;)
The Action Name is used to identify the action from the list of actions created.
The Action URL is where you get to choose the URL of your new page, so if you put privacy in that field, the new page will be found at yoursite.com/index.php?action=privacy, for example.
The HTML Body is where you create your page. Try some of the html you have already prepared for your page maybe, but without the <html> tags. You may need to play with it to make it appear as you want.
As for the HTML Headers, we'll need someone who knows more than I to explain that one - I just left it blank :P
I have made a few enhancements to this mod for my own use.
I has occurred to me that perhaps someone else might benefit from this.
Before packaging everything up properly and conferring with the mod author about the best way forward I want to check if there is any interest among the mod users, otherwise it's just unnecessary work.
Bug fixes
- Including a </textarea> tag in block would mess up the editor.
- Using the same url parameter for a top level action and a sub action, (of any top level action), or for several sub actions of different top level actions could lead to the wrong action being executed.
- The same url parameter could be entered for several top level actions or several sub actions of the same top level action.
- The alternate row styling in the action list did not extend to the "Enabled" and "Modify" columns.
New features
- Optional menu buttons also for sub actions, (selectable per sub action).
- A new sub action type, "None".
Such a sub action will not have any code of its own, instead the parent action is executed with an extra ";sa=subaction" parameter.
The same thing would happen if the sub action wasn't defined at all, the difference being that a sub action can have a menu button and its own set of permissions, different from the parent action. - PHP and HTML blocks are edited using Codemirror (http://codemirror.net) instead of in a plain textarea.
This brings benefits such as:
*Syntax colouring
*Automatic indentation
*Brace matching
*Full screen mode - Menu buttons for custom actions now appear just before the Login/Logout button, not at the end of the menu.
- The link tree is automatically populated, (can be overridden in PHP actions).
- The Who's Online page shows the action name instead of "Unknown action", (depending on permissions).
Can be overridden by language strings in the Who.*.php files. - The action name, (used in menu button text, page title, link tree text and Who's Online), can optionally be translated using standard SMF language strings.
- Last, and for most people probably also least, added Swedish translation in addition to the existing English and German.
Refactoring
- Partly converted to use integration hooks.
- Language strings moved to separate files for utf8 and non-utf8 texts.
This makes it easier to provide both utf8 and non-utf8 versions also for other languages than English, without having to resort to html entites.
New bugs
- Probably, but none that I'm aware of.
Quote from: andershz on October 20, 2013, 01:11:19 PM
- Including a </textarea> tag in block would mess up the editor.
How do you solve this?
I have a custom Form that uses some Textareas and cant get this to work properly.
It's mentioned a couple of pages back in this thread.
http://www.simplemachines.org/community/index.php?topic=86793.msg3230017#msg3230017
Is it just me or when I want to change the name of the action I alredy made before the name of the action stays the same in the subs?
Hello!
It is possible and how the button of a custom action put near Home button and not last of menu..
bump
Ok I found the solution :D
hi i want to use in post
Nice mod! :D
Quote from: tylerabell on May 16, 2008, 01:12:26 AM
when i make a php page then go to the page i get the following error...
Parse error: syntax error, unexpected $end in /home/sites/forgeguide.com/public_html/Sources/Load.php(1747) : eval()'d code(9) : eval()'d code on line 1
I have the exact same issue... On a fresh install of 2.0.8. The action just has "test" written in it. If I change it to html it works ok.
Different line though:
Parse error: syntax error, unexpected end of file in C:\xampp\htdocs\forum\Sources\Load.php(2165) : eval()'d code(20) : eval()'d code on line 1
Edit: Ah, simple matter. Way too simple of a test. Just some random echo works :)
And as a suggestion, it would be nice if you could choose which theme would show the action with by default, like you'd do on a board.
This mod requires/creates rows in {smf}permissions, named "ca_1" "ca_2" etc.
While diagnosing why my members occasionally lose 'allow' permissions to their Custom Actions I spotted that these rows are being deleted whenever anything is changed within their overall membergroup permissions.
EG, I give my Global Mods permission to use Custom Action 1. Later I go to their membergroup and change their Gallery permission. Upon saving that, their Custom Action permission row (ca_1) has been deleted, meaning they no longer have the permission to use Custom Action 1.
Easy resolution is to revisit the Custom Action feature within Admin > Configuration > Features & Options > Custom Actions and reset it there, though it would be neat if the permissions rows weren't deleted to start with :(
Quote from: andershz on October 20, 2013, 01:11:19 PM
I have made a few enhancements to this mod for my own use.
I has occurred to me that perhaps someone else might benefit from this.
Before packaging everything up properly and conferring with the mod author about the best way forward I want to check if there is any interest among the mod users, otherwise it's just unnecessary work.
Well, I'm interested.
Since it's a old post, I'm messaging you.
Quick question, how do i create a sub-action?
This is a well hidden feature.
In the table of actions there is a column named Sub-Actions, indicating the number of sub actions (contains zero if there are none).
Click on that number to get to a page where sub actions can be added/modified/deleted.
Thanks!
If installed under mariadb, the db installer with fail with an error msg for every " 'default' => '', " entry in the file install.php.
Removing that entries will make it work agian.
I tried creating custom action to update smf_members table. I want to change IP address and used this code
UPDATE `db_name`.`smf_members` SET `member_ip` = 'xxx.xxx.xx.xxx',
`member_ip2` = 'yyy.yyy.yy.yyy' WHERE `smf_members`.`id_member` =n;
Could not accomplish. Should I be doing something differently ?
Um, what were you trying to achieve exactly?
Like I said, UPDATE the smf_members table to change IP for one user.
Um, why? And what does that have to do with this mod?
What I'm trying to do is execute this action with a button click, rather than going into phpMyAdmin and doing it manually every time.
For something that SMF will rewrite anyway for users (almost) every time they hit a page?
when attempting to install this I got, basically AFTER I clicked install this poped up:
BLOB, TEXT, GEOMETRY or JSON column 'name' can't have a default value
File: /Packages/temp/install.php
Line: 123
and this is the line that is causing the problem
$smcFunc['db_create_table']('{db_prefix}custom_actions', $columns, $indexes, array(), 'update_remove');
Quote from: Shambles on December 12, 2012, 03:36:29 PM
Are these sub-actions really only accessible via URL (action=xx;sa=yy) or should they indeed appear within the new menu button?
I'm off for a tab...
Going to re-ask this question. My subaccounts do not appear as a drop-down menu like my admin/moderator/member buttons.
Hello,
Is there a way to include theme's default bars and colors to the "page" under the action if BBC is selected?
For example to look as "index.php?action=help".
Quote from: Pyrhel on October 18, 2019, 10:25:32 AM
Hello,
Is there a way to include theme's default bars and colors to the "page" under the action if BBC is selected?
For example to look as "index.php?action=help".
Not sure I follow, can you attach a picture of this "issue"?
If the help action is opened, it looks like this:
(https://postimg.cc/kDxvyG5v)
But if the custom action is opened, it doesn't have the theme's look and is displayed like this:
(https://postimg.cc/2LFdjctK)
Is it possible themes' style to be included in the custom page to keep the look and feel of the theme. I saw similar thing in one of the portals (I think it was "tiny portal") in which the style can be selected - to use theme's colors, borders, etc or not to.
It doesn't do anything because it's designed as a base for you to have complete control over what that custom action does, up to and including putting literally whatever content you want there - adding what you're asking for actually runs counter to what it was designed for.
Going with something like TP might be a simpler and better option.
I am using custom actions mode to make CMS-like webpages that render within the forum's theme. I am currently using the HTML feature so that I can insert a page-specific stylesheet into the head that I do not want included on the forum's main page. However I really would prefer to use the PHP option so I can include to an external file, saving me from having to edit the code in the custom actions panel. However, the PHP option does not have the ability to put code in the head (instead replacing that with the Source File Code). Any hacks or tips to kinda get the best of both worlds? Ideally the top box allowing a link to a stylesheet while the bottom box allows the insertion of a php include. I know I could use an iframe on the html side but I hate iframes.
Quote from: thepitster on August 02, 2017, 04:12:55 PMwhen attempting to install this I got, basically AFTER I clicked install this poped up:
BLOB, TEXT, GEOMETRY or JSON column 'name' can't have a default value
File: /Packages/temp/install.php
Line: 123
and this is the line that is causing the problem
$smcFunc['db_create_table']('{db_prefix}custom_actions', $columns, $indexes, array(), 'update_remove');
Hi Guys,
i have the exact same problem.
Tested with SMF2.0.19 and 2.1.1 also with PHP7.2 and PHP7.4.
Any solution/workaround for this issue?
Best regards
NemWar