|
Joined: Dec 2009
Posts: 12
stranger
|
stranger
Joined: Dec 2009
Posts: 12 |
Hi,
I was wondering if UBB provides a mechanism for creating custom pages so that I could add pages to a UBB installation and leverage its login mechanism, etc., as opposed to adding UBB to a site with stand alone custom pages?
Thank you
|
|
|
|
Joined: Jun 2006
Posts: 9,242 Likes: 1
Former Developer
|
Former Developer
Joined: Jun 2006
Posts: 9,242 Likes: 1 |
Yes, there is a sample script and template included with the software that you can use to include your own pages within. By modifying the samples you can create as many custom pages as you want which will have access to all of the ubb functions, login, etc.
|
|
|
|
Joined: Dec 2009
Posts: 12
stranger
|
stranger
Joined: Dec 2009
Posts: 12 |
That's great, thank you Rick.
|
|
|
|
Joined: May 2008
Posts: 753 Likes: 1
Old Hand
|
Old Hand
Joined: May 2008
Posts: 753 Likes: 1 |
Yes, there is a sample script and template included with the software that you can use to include your own pages within. By modifying the samples you can create as many custom pages as you want which will have access to all of the ubb functions, login, etc. there is? I gotta read my documentation! lol
"No matter where you go, there you are." "If you can't do something smart, Do something right" "There are three kinds of people in the world, those who can count, and those who can't"
|
|
|
|
Joined: Jun 2006
Posts: 9,242 Likes: 1
Former Developer
|
Former Developer
Joined: Jun 2006
Posts: 9,242 Likes: 1 |
It's one of those undocumented things (We will be better at this with 8.0, I promise . But inside the scripts directory is a sample.inc.php file and inside the templates/default directory is a sample.tpl file. Both commented so they are pretty easy to follow.
|
|
|
|
Joined: May 2008
Posts: 753 Likes: 1
Old Hand
|
Old Hand
Joined: May 2008
Posts: 753 Likes: 1 |
I will have to check this out later when I have a few minutes.
"No matter where you go, there you are." "If you can't do something smart, Do something right" "There are three kinds of people in the world, those who can count, and those who can't"
|
|
|
|
Joined: Dec 2006
Posts: 1,235
veteran
|
veteran
Joined: Dec 2006
Posts: 1,235 |
Rick, will the V7 custom templates be compatible with V8?
|
|
|
|
Joined: Jun 2006
Posts: 16,367 Likes: 126
|
Joined: Jun 2006
Posts: 16,367 Likes: 126 |
if you want a good easy to follow example of a custom script, go to UBBDev and download my pJIRC addon and compare it to the sample page; you'll see how to call just about anything
|
|
|
|
Joined: Dec 2003
Posts: 6,629 Likes: 85
|
Joined: Dec 2003
Posts: 6,629 Likes: 85 |
What !!! Not going to plug your wrapper hack at ubbdev??? I think it works quite nice.
Blue Man Group There is no such thing as stupid questions. Just stupid answers
|
|
|
|
Joined: Jun 2006
Posts: 16,367 Likes: 126
|
Joined: Jun 2006
Posts: 16,367 Likes: 126 |
Well, the pJIRC does a better job of showing how things work than the wrapper... Though the wrapper is great if you just want to wrap pages into the UBB with little know-how needed...
|
|
|
|
Joined: Dec 2009
Posts: 12
stranger
|
stranger
Joined: Dec 2009
Posts: 12 |
if you want a good easy to follow example of a custom script, go to UBBDev and download my pJIRC addon and compare it to the sample page; you'll see how to call just about anything Thanks, I'll check it out.
|
|
|
|
Joined: Mar 2008
Posts: 262
enthusiast
|
enthusiast
Joined: Mar 2008
Posts: 262 |
Can't seem to find the sample.tpl file It is not on my site or in the 7.5.5 file I just downloaded...
|
|
|
|
Joined: Apr 2007
Posts: 3,940 Likes: 1
Former Developer
|
Former Developer
Joined: Apr 2007
Posts: 3,940 Likes: 1 |
yah, the sample.inc.php is just part of it. would be nice if there was a sample.tpl (which it references) too
|
|
|
|
Joined: Jun 2006
Posts: 9,242 Likes: 1
Former Developer
|
Former Developer
Joined: Jun 2006
Posts: 9,242 Likes: 1 |
|
|
|
|
Joined: Apr 2007
Posts: 3,940 Likes: 1
Former Developer
|
Former Developer
Joined: Apr 2007
Posts: 3,940 Likes: 1 |
go all the way and complete the triple play with a sample.php (/languages/english)
|
|
|
|
Joined: Jun 2006
Posts: 9,242 Likes: 1
Former Developer
|
Former Developer
Joined: Jun 2006
Posts: 9,242 Likes: 1 |
That might take a few extra keystrokes. I dunno, but I'll try
|
|
|
|
Joined: Mar 2008
Posts: 262
enthusiast
|
enthusiast
Joined: Mar 2008
Posts: 262 |
Can I get get a early copy
|
|
|
|
Joined: Dec 2003
Posts: 6,629 Likes: 85
|
Joined: Dec 2003
Posts: 6,629 Likes: 85 |
You can look at a few hacks by Giz. Try https://www.ubbcentral.com/forums/ubbthreads.php/topics/227834/1.htmlTo start with. But anyway the file is in the scripts folder. Sample.inc.php not the templates like everyone says.
Blue Man Group There is no such thing as stupid questions. Just stupid answers
|
|
|
|
Joined: Apr 2007
Posts: 3,940 Likes: 1
Former Developer
|
Former Developer
Joined: Apr 2007
Posts: 3,940 Likes: 1 |
ruben, to clarify -- there are usually 3 files involved in a 'script' 1. scripts/coolthingie.inc.php 2. templates/default/coolthingie.tpl 3. languages/english/coolthingie.php so yes, 'the file' is in the scripts, but to truly be a full sample, it should include all 3.. then this could be called by yourforum/url/to/forum/ubbthreads.php?ubb=coolthingie
|
|
|
|
Joined: Dec 2003
Posts: 6,629 Likes: 85
|
Joined: Dec 2003
Posts: 6,629 Likes: 85 |
Oh I agree 100%. It has always been clear as Mud on how to create a custom page using the sample script. And the other pieces have always been missing. As well as any documentation on how to apply them.
Blue Man Group There is no such thing as stupid questions. Just stupid answers
|
|
|
|
Joined: Mar 2008
Posts: 262
enthusiast
|
enthusiast
Joined: Mar 2008
Posts: 262 |
I am looking at some of the other templates and sorta see how it all works, but having a sample and some docs would be helpful. I am trying to build a page like the showmembers.tpl to search a different database. I have most of the code ready, but not exactly sure how to put it in the .tpl file... SD was the one that pointed me to run it through the ubb engine
|
|
|
|
Joined: Dec 2003
Posts: 6,629 Likes: 85
|
Joined: Dec 2003
Posts: 6,629 Likes: 85 |
For now I would look at ubbdev for clues. Search for wrapper or pJIRC Like SD said you need to create three files to make it work.
Blue Man Group There is no such thing as stupid questions. Just stupid answers
|
|
|
|
Joined: Jun 2006
Posts: 16,367 Likes: 126
|
Joined: Jun 2006
Posts: 16,367 Likes: 126 |
You should post your completed project to help others learn; it's how most of my "mods" at ubbdev happen hehe
|
|
|
2 members (Ruben, SenecaFlyer),
929
guests, and
67
robots. |
Key:
Admin,
Global Mod,
Mod
|
|
|
|