SimplePortal

Customization => Custom Coding => Topic started by: ivanmaks on April 09, 2009, 06:56:47 AM

Title: Add custom pages
Post by: ivanmaks on April 09, 2009, 06:56:47 AM
Hi all,

im wondering how to make a custom page with php/html code and not only bb code... any ideas?

ty  :D

Title: Re: Add custom pages
Post by: Nathaniel on April 09, 2009, 08:22:22 AM
Moved to Custom Coding Board.

That is more of a General SMF coding question than a specific SP question.

Have a read of this topic from SM.org:
http://www.simplemachines.org/community/index.php?topic=261151.msg1701428#msg1701428

You can easily add custom actions/pages using the process in that post, you will need to add your action to your 'index.php' file, there is a large array near the end of the file, that is where you add it. The file is documented, although I can help you more if you need it.

Hopefully SimplePortal will have features that allow you to more easily add pages to SMF, sometime in a future version. :)
Title: Re: Add custom pages
Post by: ivanmaks on April 09, 2009, 11:21:52 AM
Moved to Custom Coding Board.

That is more of a General SMF coding question than a specific SP question.

Have a read of this topic from SM.org:
http://www.simplemachines.org/community/index.php?topic=261151.msg1701428#msg1701428

You can easily add custom actions/pages using the process in that post, you will need to add your action to your 'index.php' file, there is a large array near the end of the file, that is where you add it. The file is documented, although I can help you more if you need it.

Hopefully SimplePortal will have features that allow you to more easily add pages to SMF, sometime in a future version. :)

ty - it doesnt sound difficult, but its too much work... well, hopefully one day this feature is going to be implemented in simple portal...  :)

Title: Re: Add custom pages
Post by: Eliana Tamerin on April 09, 2009, 11:33:56 AM
There's a Custom Actions mod (http://custom.simplemachines.org/mods/index.php?mod=331) by winrules, though it's compatible only with SMF 2.0 Beta 3 Public right now. That would allow you to easily create pages of php, html and bbc without digging through files. You'd probably have to update it or wait for winrules to update it if you wanted to use it, though.

If you just want pure html/bbc pages, then Robbo made a Custom Pages (http://custom.simplemachines.org/mods/index.php?mod=1347) mod that should work well for your situation.

Otherwise, if you want to do it yourself, custom pages require 1) a Source file, 2) a Template file and 3) a line in your forum root's index.php telling it which action loads which source file and template.
Title: Re: Add custom pages
Post by: WhisperSuLtaN on July 23, 2009, 02:35:07 PM
merhaba herkes ingilizce konusuyor ve ben anlamıyorum ...

bu siteden nasıl faydalanacağım...

bana yardım edermisiniz ...

amacim forumunuzu kirletmek değil şimdiden özür dilerim ....

lütfen yardim edin ...


teşekkürler
Title: Re: Add custom pages
Post by: Eliana Tamerin on July 23, 2009, 04:54:32 PM
English in the main boards, please.
Title: Re: Add SP Blocks to Custom Pages
Post by: Semerkhet on August 30, 2009, 12:32:41 PM
smf 2.0 RC1.2
SP 2.2.2


Trying to get the SP blocks to appear around the pages I create using Robbo's Custom Pages mod.

I read the post referred to above about adding the action to the array in the index.php file.  However, I'm not quite catching on to how to code the entry.

Maybe a code example would help?

Let's say I've created 2 pages.  One is TestPage and the other is TP2.  How do I add this to the array?

Also, will these page actions appear as a check box option in the Display Options of the SP blocks I want to show with them or do I need to add them to the Custom Display Options (text input block)?

Thanks!
SimplePortal 2.3.8 © 2008-2024, SimplePortal