Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: dennisvdz on July 13, 2008, 12:18:32 PM

Title: Creating a custom page
Post by: dennisvdz on July 13, 2008, 12:18:32 PM
I'd like to create a custom PHP/HTML page.
For this I'd like something like ?action=mypage, so it include mypage.php in the window..

So how I do that?

Thanks, Dennis.
Title: Re: Creating a custom page
Post by: sawz on July 13, 2008, 12:21:23 PM
try the custom action mod (http://custom.simplemachines.org/mods/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 accessed by going to http://www.yoursite.com/smf/index.php?action= (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= (http://www.yoursite.com/smf/index.php?action=)action name;sa=sub-action name.
Title: Re: Creating a custom page
Post by: dennisvdz on July 13, 2008, 12:23:12 PM
Cool!

Now still one question, when I install mods, get I:

Miscellaneous
-----------------------------
There are no modifications installed that have added any settings to this area yet.

So, where and how to install?
Title: Re: Creating a custom page
Post by: dennisvdz on July 13, 2008, 01:34:57 PM
So other;
When I upload all to my Sources dir, I get this error when start Install.php:


Fatal error: Call to undefined function updateSettings() in ***/public_html/forums/Sources/install.php on line 9
Title: Re: Creating a custom page
Post by: sawz on July 13, 2008, 03:03:15 PM
you install the mod through the package manager.

Admin > Packages > Download New Packages

browse for the zipped mod on your computer and upload it,
then you'll apply it. you'll find the settings for it in Features and Options.
Title: Re: Creating a custom page
Post by: dennisvdz on July 14, 2008, 05:32:58 AM
Okay.. Its installed. Now I need to add pages, but i see nowhere where I can do that.
Title: Re: Creating a custom page
Post by: dennisvdz on July 14, 2008, 06:13:53 AM
hmm.. I'v got an error now that it's not compitable with my version of SMF.. But I use SMF 2.0 Beta 3.1 Public.
Title: Re: Creating a custom page
Post by: Nathaniel on July 14, 2008, 06:25:24 AM
Which version did of the mod did you download? You will need the "customaction3-0.zip" package for SMF 2 Beta.
Title: Re: Creating a custom page
Post by: dennisvdz on July 14, 2008, 06:39:58 AM
That i do..
Title: Re: Creating a custom page
Post by: dennisvdz on July 14, 2008, 06:46:15 AM
Need I upload the RAR in the package manager?

If yes, I do, It says thats its succesfully installed, but I see neverwhere the MOD, alsoo not in the Installed Pagages.
Title: Re: Creating a custom page
Post by: Nathaniel on July 14, 2008, 07:00:22 AM
Have a read of the Package Manager documentation (http://docs.simplemachines.org/index.php?board=49.0;sort=subject), if you are having trouble understanding it. Yes you do need to upload the "customaction3-0.zip" file via the package manager.

The settings for the Custom Action Mod for SMF 2 Beta, should in the admin area under "Configuration" -> "Features and Options" -> "Custom Actions", not in the normal "Modifications.." section.
Title: Re: Creating a custom page
Post by: dennisvdz on July 14, 2008, 07:15:09 AM
But I don't see that Custom Action page..
Title: Re: Creating a custom page
Post by: Nathaniel on July 14, 2008, 07:28:38 AM
Ah, I remember this problem, there may be an issue with the language string. Try to "Empty the file cache." and then find the settings page again, you can empty the file cache at "Maintenance" -> "Forum Maintenance" -> "Empty the file cache.", it should refresh the template/languages cache, which will hopefully make the link to the settings page ''appear.
Title: Re: Creating a custom page
Post by: dennisvdz on July 14, 2008, 07:31:58 AM
Nope..
Also in the Installed Mods page, the Custom Page not appear..
Title: Re: Creating a custom page
Post by: Nathaniel on July 14, 2008, 07:35:56 AM
Are you sure that you installed it correctly? To install it you need to click on it in the mods list and follow the package installation instructions, at the end of the installation process it should say "The package was installed successfully. You should now be able to use whatever functionality it adds or changes; or not be able to use functionality it removes.". If you haven't seen this message then you haven't installed the mod...
Title: Re: Creating a custom page
Post by: dennisvdz on July 14, 2008, 07:40:35 AM
When I install again, it ays that the package already exist..
Title: Re: Creating a custom page
Post by: Nathaniel on July 14, 2008, 07:59:23 AM
That message comes up, when you try to upload the package, but its already there. Go to the "Browse Packages" list and click on the "[ Apply Mod ]" text next to the "Custom Action Mod" entry on the list. Then you just need to follow the steps...
Title: Re: Creating a custom page
Post by: dennisvdz on July 14, 2008, 08:10:28 AM
Okay. Thats the good page :o)

Now i get again an error..

"You cannot download or install new packages because the Packages directory or one of the files in it are not writable!"
But all are writeable
Title: Re: Creating a custom page
Post by: Nathaniel on July 14, 2008, 08:14:40 AM
Are you sure that the package folder is set to 0777?
How do I chmod? / what is chmod? (http://docs.simplemachines.org/index.php?topic=477)
Title: Re: Creating a custom page
Post by: dennisvdz on July 14, 2008, 08:17:55 AM
Sure I do.
Title: Re: Creating a custom page
Post by: sawz on July 14, 2008, 09:47:36 AM
create a folder in the Packages folder called "temp"
give it 0777 and try again. that sometimes works.
Title: Re: Creating a custom page
Post by: dennisvdz on July 14, 2008, 10:27:45 AM
Nope, it will not work.
Title: Re: Creating a custom page
Post by: Rumbaar on July 18, 2008, 08:09:53 PM
What is the languages settings in your Server Settings area of your forum?

It's strange you had no issue installing the original mod, but now are getting issue.  Did you change anything server side?
Title: Re: Creating a custom page
Post by: Scratching my Head on November 20, 2010, 02:31:03 PM
I know this is an old topic, but I have a question about it?

I'm using the custom action mod.
I have SMF 2.0 RC4 as my software.

I have created the custom page.

Now I want that page to be the default page visitors, guests,
and members first land on when coming to the forum.


Is there any way at all to do this?


Hope everyone is well.

And thanks.
Title: Re: Creating a custom page
Post by: Matthew K. on November 20, 2010, 06:12:32 PM
You really should create your own topic in Coding Discussion.
Quote from: Scratching my Head on November 20, 2010, 02:31:03 PM
I know this is an old topic, but I have a question about it?

I'm using the custom action mod.
I have SMF 2.0 RC4 as my software.

I have created the custom page.

Now I want that page to be the default page visitors, guests,
and members first land on when coming to the forum.


Is there any way at all to do this?


Hope everyone is well.

And thanks.
Title: Re: Creating a custom page
Post by: Scratching my Head on November 20, 2010, 06:33:26 PM
Okay.