News:

SMF 2.0.19 has been released! Please update. Read more.

Main Menu

Custom Action Mod

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

Previous topic - Next topic

falguni1

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.

Darkorical

#281
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

mobious74

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.....;)
smf_1-1-rc1

worm82075

#283
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

ameo

This is one of the best mods ever. Saved me so much time. Thank U.
antechinus:
QuoteIf you are dying for a solution it may be wise to seek medical attention.
Get some Awesome Smileys for your forum

|±(ಠ_ಠ
)±|

winrules

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.


winrules
SMF Developer
               
My Mods
Please do not PM me for support.


PfalzNacht

#286
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?

winrules

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.


winrules
SMF Developer
               
My Mods
Please do not PM me for support.


PfalzNacht

I use 2.0, but only to test.

JoshieDaMan

#289
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.


winrules

What SMF version are you using? Do you notice any errors in your error log?


winrules
SMF Developer
               
My Mods
Please do not PM me for support.


JoshieDaMan

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.

winrules

3.0 only works on SMF 2.0. You need to use 2.04.


winrules
SMF Developer
               
My Mods
Please do not PM me for support.



58tbird

#295
I guess I posted this on the wrong board:
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. :)

winrules

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


winrules
SMF Developer
               
My Mods
Please do not PM me for support.


58tbird

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, 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?

ameo

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>
antechinus:
QuoteIf you are dying for a solution it may be wise to seek medical attention.
Get some Awesome Smileys for your forum

|±(ಠ_ಠ
)±|

winrules

#299
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).


winrules
SMF Developer
               
My Mods
Please do not PM me for support.


Advertisement: