Customizing SMF > Modifications and Packages
Custom Action Mod
Jeff B:
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. :-\
andershz:
The mod adds the line below to Themes/default/Admin.template.php, (line 2323 in my version).
--- Code: ---<textarea name="body" rows="20" cols="60">', $context['action']['body'], '</textarea>
--- End code ---
If that line is replaced with
--- Code: ---<textarea name="body" rows="20" cols="60">', htmlspecialchars($context['action']['body']), '</textarea>
--- End code ---
it seems to work.
Jeff B:
Excellent! Seems to work perfectly. Thank you very much. :)
dwd2000:
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
--- Code: ---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
--- End code ---
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
--- Code: ---if ($context['user']['is_guest'])
die('Direct Access to this location is not allowed.');
else
--- End code ---
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
--- End quote ---
geek_andy:
--- 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.
--- End quote ---
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 ;)
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version