Previous Thread
Next Thread
Print Thread
Hop To
Joined: Dec 2009
Posts: 12
A
stranger
OP Offline
stranger
A
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
R
Former Developer
Offline
Former Developer
R
Joined: Jun 2006
Posts: 9,242
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
A
stranger
OP Offline
stranger
A
Joined: Dec 2009
Posts: 12
That's great, thank you Rick.

Joined: May 2008
Posts: 739
Likes: 1
Old Hand
Offline
Old Hand
Joined: May 2008
Posts: 739
Likes: 1
Originally Posted by Rick
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
R
Former Developer
Offline
Former Developer
R
Joined: Jun 2006
Posts: 9,242
It's one of those undocumented things (We will be better at this with 8.0, I promise wink. 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: 739
Likes: 1
Old Hand
Offline
Old Hand
Joined: May 2008
Posts: 739
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
Offline
veteran
Joined: Dec 2006
Posts: 1,235
Rick, will the V7 custom templates be compatible with V8?

Joined: Jun 2006
Posts: 16,014
Likes: 58
UBB.threads Developer
Offline
UBB.threads Developer
Joined: Jun 2006
Posts: 16,014
Likes: 58
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


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Dec 2003
Posts: 6,278
Likes: 45
Online Yawn
Joined: Dec 2003
Posts: 6,278
Likes: 45
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,014
Likes: 58
UBB.threads Developer
Offline
UBB.threads Developer
Joined: Jun 2006
Posts: 16,014
Likes: 58
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...


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Dec 2009
Posts: 12
A
stranger
OP Offline
stranger
A
Joined: Dec 2009
Posts: 12
Originally Posted by Gizmo
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
Offline
enthusiast
Joined: Mar 2008
Posts: 262
Can't seem to find the sample.tpl file frown It is not on my site or in the 7.5.5 file I just downloaded...


Ian
http://www.firstgenmc.com/ubbthreads

"Experience is a hard teacher because she gives the test first, the lesson afterwords."
Joined: Apr 2007
Posts: 3,940
SD Offline
Former Developer
Offline
Former Developer
Joined: Apr 2007
Posts: 3,940
yah, the sample.inc.php is just part of it.

would be nice if there was a sample.tpl (which it references) too laugh

Joined: Jun 2006
Posts: 9,242
R
Former Developer
Offline
Former Developer
R
Joined: Jun 2006
Posts: 9,242
Will put one into 7.5.6.

Joined: Apr 2007
Posts: 3,940
SD Offline
Former Developer
Offline
Former Developer
Joined: Apr 2007
Posts: 3,940
go all the way and complete the triple play with a sample.php (/languages/english)

[Linked Image from sirdude.com]

2c

Joined: Jun 2006
Posts: 9,242
R
Former Developer
Offline
Former Developer
R
Joined: Jun 2006
Posts: 9,242
That might take a few extra keystrokes. I dunno, but I'll try wink

Joined: Mar 2008
Posts: 262
enthusiast
Offline
enthusiast
Joined: Mar 2008
Posts: 262
Can I get get a early copy smile


Ian
http://www.firstgenmc.com/ubbthreads

"Experience is a hard teacher because she gives the test first, the lesson afterwords."
Joined: Dec 2003
Posts: 6,278
Likes: 45
Online Yawn
Joined: Dec 2003
Posts: 6,278
Likes: 45
You can look at a few hacks by Giz.
Try https://www.ubbcentral.com/forums/ubbthreads.php/topics/227834/1.html
To 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
SD Offline
Former Developer
Offline
Former Developer
Joined: Apr 2007
Posts: 3,940
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

[Linked Image from sirdude.com]

Joined: Dec 2003
Posts: 6,278
Likes: 45
Online Yawn
Joined: Dec 2003
Posts: 6,278
Likes: 45
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
Offline
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 smile


Ian
http://www.firstgenmc.com/ubbthreads

"Experience is a hard teacher because she gives the test first, the lesson afterwords."
Joined: Dec 2003
Posts: 6,278
Likes: 45
Online Yawn
Joined: Dec 2003
Posts: 6,278
Likes: 45
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,014
Likes: 58
UBB.threads Developer
Offline
UBB.threads Developer
Joined: Jun 2006
Posts: 16,014
Likes: 58
You should post your completed project to help others learn; it's how most of my "mods" at ubbdev happen hehe


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!

Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
v7.7.5 Active Topics Display Name Incorrect
by Jake - 11/17/2020 4:46 PM
custom islands in forums tool
by Ruben - 11/17/2020 3:21 PM
Captcha bug maybe?
by Morgan - 11/16/2020 8:34 AM
Facebook thumbnail issue
by DBryce - 11/08/2020 7:43 PM
No hop to menu in the category pages
by Morgan - 11/05/2020 4:19 PM
Who's Online Now
1 members (Ruben), 56 guests, and 45 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
gallery test
gallery test
by Mors, September 23
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Powered by UBB.threads™ PHP Forum Software 7.7.5