Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Mar 2000
Posts: 21,080
Likes: 3
I type like Navaho
I type like Navaho
Joined: Mar 2000
Posts: 21,080
Likes: 3
Name: UBB PHP STYLE FILE

Description: Creates a vars_style.inc.php file in whch you can include your forum styles/header/footer/etc into any php page.

Link: https://www.ubbdev.com/hacks/6.3/ubbphpstyle.zip

Demo: none

Author: Allen Ayres

Credits: Charles Capps for the pointers smile

Requirement: UBBâ„¢ 6+

Note: Rather easy to install and run. It's of alpha/beta quality only because I didn't include any visual info (html) that the file actually did what it was supposed to. You modify cp.cgi and upload the the included .cgi file and access it via your forum's /cp.cgi?ubb=styles_php. It runs and writes the vars_style.inc.php file, giving you all the styles data you could need to use in any php page in your site. Require the file into your .php file (example: index.php) and call the variables ($Header, $Footer, $TableTop, $TableColorStrip, $FontFace, etc. etc. etc.) - for a full list, check the included file for what variables are written.

Thanks in advance to those who might find any bugs, I've tested it on 6.3.0.1 smile


- Allen wavey
- What Drives You?
Sponsored Links
Joined: Oct 2000
Posts: 2,665
Veteran
Veteran
Offline
Joined: Oct 2000
Posts: 2,665
gonna use that one no later than now wink


Do you believe in love at first sight,
or should I walk by again?
Joined: Mar 2000
Posts: 21,080
Likes: 3
I type like Navaho
I type like Navaho
Joined: Mar 2000
Posts: 21,080
Likes: 3
danke, tell me how it goes, should be easy-squeezy smile

I have other uses for it, thought I would release it for those who need it smile


- Allen wavey
- What Drives You?
Joined: Oct 2000
Posts: 2,665
Veteran
Veteran
Offline
Joined: Oct 2000
Posts: 2,665
my server crashed and my HD is broken I will give it a go once I have restored the forums data.


Do you believe in love at first sight,
or should I walk by again?
Joined: May 2001
Posts: 6,708
Member
Member
Offline
Joined: May 2001
Posts: 6,708
Nice work AA, although I don't know if I need to use it. smirk

Sponsored Links
Joined: Jun 2001
Posts: 2,848
Spotlight Winner
Spotlight Winner
Offline
Joined: Jun 2001
Posts: 2,848
I think this has a lot of possibilities for incorporating into nuked themes.

Joined: Mar 2000
Posts: 21,080
Likes: 3
I type like Navaho
I type like Navaho
Joined: Mar 2000
Posts: 21,080
Likes: 3
good idea, just a matter of changing the names of the variables to match what's needed. smile


- Allen wavey
- What Drives You?
Joined: Jun 2001
Posts: 2,848
Spotlight Winner
Spotlight Winner
Offline
Joined: Jun 2001
Posts: 2,848
Can it do $TBT and $TBB?

Joined: Mar 2000
Posts: 21,080
Likes: 3
I type like Navaho
I type like Navaho
Joined: Mar 2000
Posts: 21,080
Likes: 3
Check the bottom of the file, I added it there. smile I gave its php equivalent the name of $TableTop and $TableBottom, can be changed if you need it.

Might also be handy to do standard_title as well smile


- Allen wavey
- What Drives You?
Joined: Jun 2001
Posts: 2,848
Spotlight Winner
Spotlight Winner
Offline
Joined: Jun 2001
Posts: 2,848
This has amazing possibilities

Sponsored Links
Joined: Mar 2000
Posts: 21,080
Likes: 3
I type like Navaho
I type like Navaho
Joined: Mar 2000
Posts: 21,080
Likes: 3
thanks, I have had this idea rolling around in my head for months, but always hit some roadblock. After talking with CC last night in prep for an article I am writing on the portal, a few things just fell into place, and voila! smile

The major + with ubb.classic is its refined gui. This allows you to import that into most any php page or application smile


- Allen wavey
- What Drives You?
Joined: Jan 2001
Posts: 1,309
Member / Blamoholic
Member / Blamoholic
Offline
Joined: Jan 2001
Posts: 1,309
Allen... your a genius. You solved my problems with this one! Thanks. laugh

Joined: Jun 2001
Posts: 2,848
Spotlight Winner
Spotlight Winner
Offline
Joined: Jun 2001
Posts: 2,848
Bookie, you and I both know that you love PHP and I think that we can do something with this...

*insert evil laugh here*

Joined: Jan 2001
Posts: 1,309
Member / Blamoholic
Member / Blamoholic
Offline
Joined: Jan 2001
Posts: 1,309
You bet. laugh

I will be integrating this with my new site... possibly a portal? laugh

I'm pretty anxious to put this in, but I've gotta finish my templates first. smile

Joined: Jun 2001
Posts: 2,848
Spotlight Winner
Spotlight Winner
Offline
Joined: Jun 2001
Posts: 2,848
Okay then, lets kick the UBB portal project into gear...

Joined: Jan 2001
Posts: 1,309
Member / Blamoholic
Member / Blamoholic
Offline
Joined: Jan 2001
Posts: 1,309
Sounds like a plan... but I don't think this is the topic to talk about it. wink

Joined: Jun 2001
Posts: 2,848
Spotlight Winner
Spotlight Winner
Offline
Joined: Jun 2001
Posts: 2,848
True, sorry bo0t that.

Joined: Oct 2000
Posts: 2,665
Veteran
Veteran
Offline
Joined: Oct 2000
Posts: 2,665
Allen, instead of generating such a file did you think of making a css stylesheet ?

like adding a link in the style window with "generate css file for this canvas"

wink


Do you believe in love at first sight,
or should I walk by again?
Joined: Mar 2000
Posts: 21,080
Likes: 3
I type like Navaho
I type like Navaho
Joined: Mar 2000
Posts: 21,080
Likes: 3
I have thought recently of it, but haven't attempted it, since most ubb's don't use css yet and I have no idea how to add the header/footer/etc html into a css file - I am pretty sure that ain't kosher. smile


- Allen wavey
- What Drives You?
Joined: Oct 2000
Posts: 2,665
Veteran
Veteran
Offline
Joined: Oct 2000
Posts: 2,665
in fact I was thinking of having all style related stuff (colors) in a css ans the rest in an include file smile


Do you believe in love at first sight,
or should I walk by again?
Joined: Oct 2000
Posts: 2,665
Veteran
Veteran
Offline
Joined: Oct 2000
Posts: 2,665
OK allen found something smile
if you have " in your header then you have a problem, you need to convert them to "


Do you believe in love at first sight,
or should I walk by again?
Joined: Mar 2000
Posts: 21,080
Likes: 3
I type like Navaho
I type like Navaho
Joined: Mar 2000
Posts: 21,080
Likes: 3
thanks Chuck smile How about just ' ? And how do you recommend that happen?


- Allen wavey
- What Drives You?
Joined: Oct 2000
Posts: 2,665
Veteran
Veteran
Offline
Joined: Oct 2000
Posts: 2,665
well I know that In PHP you have the magicquotes function that does just that (convert to ") but I don't know if there is a perl equivalent.


Do you believe in love at first sight,
or should I walk by again?
Joined: Mar 2001
Posts: 7,394
LK Offline
Admin / Code Breaker
Admin / Code Breaker
Offline
Joined: Mar 2001
Posts: 7,394
BTW, I suggest you to use ' instead of ", I think PHP has some more problems with " ($ -> $, etc)... Then replace ' with ', and maybe with \. (but just maybe tipsy )

Joined: Oct 2000
Posts: 2,665
Veteran
Veteran
Offline
Joined: Oct 2000
Posts: 2,665
yes but html compliant codes uses " wink so when you do a copy and paste its what you will get smile


Do you believe in love at first sight,
or should I walk by again?
Joined: Oct 2001
Posts: 572
Member
Member
Offline
Joined: Oct 2001
Posts: 572
I will proble play with this wonderful hack in the next few days. smile

Joined: Jul 2001
Posts: 45
Junior Member
Junior Member
Offline
Joined: Jul 2001
Posts: 45
umm aint there a function that will strip the output so that the " becomes " ?

umm.. i m thinking... *thinks* :S


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
• Shock Hosting
• Stable Host
• bluehost
• InterServer
Visit us on Facebook
Member Spotlight
JAISP
JAISP
PA
Posts: 449
Joined: February 2008
Forum Statistics
Forums63
Topics37,583
Posts293,955
Members13,826
Most Online151,614
Nov 14th, 2025
Today's Statistics
Currently Online 13812
Topics Created 0
Posts Made 0
Users Online 1
Birthdays 12
Top Posters
AllenAyres 21,080
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,834
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2026 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20260108)