|
|
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 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 
|
|
|
|
|
Joined: Oct 2000
Posts: 2,665
Veteran
|
|
Veteran
Joined: Oct 2000
Posts: 2,665 |
gonna use that one no later than now 
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 I have other uses for it, thought I would release it for those who need it 
|
|
|
|
|
Joined: Oct 2000
Posts: 2,665
Veteran
|
|
Veteran
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
Joined: May 2001
Posts: 6,708 |
Nice work AA, although I don't know if I need to use it. 
|
|
|
|
|
Joined: Jun 2001
Posts: 2,848
Spotlight Winner
|
|
Spotlight Winner
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. 
|
|
|
|
|
Joined: Jun 2001
Posts: 2,848
Spotlight Winner
|
|
Spotlight Winner
Joined: Jun 2001
Posts: 2,848 |
|
|
|
|
|
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.  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 
|
|
|
|
|
Joined: Jun 2001
Posts: 2,848
Spotlight Winner
|
|
Spotlight Winner
Joined: Jun 2001
Posts: 2,848 |
This has amazing possibilities
|
|
|
|
|
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! The major + with ubb.classic is its refined gui. This allows you to import that into most any php page or application 
|
|
|
|
|
Joined: Jan 2001
Posts: 1,309
Member / Blamoholic
|
|
Member / Blamoholic
Joined: Jan 2001
Posts: 1,309 |
Allen... your a genius. You solved my problems with this one! Thanks. 
|
|
|
|
|
Joined: Jun 2001
Posts: 2,848
Spotlight Winner
|
|
Spotlight Winner
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
Joined: Jan 2001
Posts: 1,309 |
You bet. I will be integrating this with my new site... possibly a portal? I'm pretty anxious to put this in, but I've gotta finish my templates first. 
|
|
|
|
|
Joined: Jun 2001
Posts: 2,848
Spotlight Winner
|
|
Spotlight Winner
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
Joined: Jan 2001
Posts: 1,309 |
Sounds like a plan... but I don't think this is the topic to talk about it. 
|
|
|
|
|
Joined: Jun 2001
Posts: 2,848
Spotlight Winner
|
|
Spotlight Winner
Joined: Jun 2001
Posts: 2,848 |
|
|
|
|
|
Joined: Oct 2000
Posts: 2,665
Veteran
|
|
Veteran
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" 
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. 
|
|
|
|
|
Joined: Oct 2000
Posts: 2,665
Veteran
|
|
Veteran
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 
Do you believe in love at first sight, or should I walk by again?
|
|
|
|
|
Joined: Oct 2000
Posts: 2,665
Veteran
|
|
Veteran
Joined: Oct 2000
Posts: 2,665 |
OK allen found something 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  How about just ' ? And how do you recommend that happen?
|
|
|
|
|
Joined: Oct 2000
Posts: 2,665
Veteran
|
|
Veteran
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
Admin / Code Breaker
|
|
Admin / Code Breaker
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  )
|
|
|
|
|
Joined: Oct 2000
Posts: 2,665
Veteran
|
|
Veteran
Joined: Oct 2000
Posts: 2,665 |
yes but html compliant codes uses "  so when you do a copy and paste its what you will get 
Do you believe in love at first sight, or should I walk by again?
|
|
|
|
|
Joined: Oct 2001
Posts: 572
Member
|
|
Member
Joined: Oct 2001
Posts: 572 |
I will proble play with this wonderful hack in the next few days. 
|
|
|
|
|
Joined: Jul 2001
Posts: 45
Junior Member
|
|
Junior Member
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
|
|
|
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.
|
|
Posts: 449
Joined: February 2008
|
|
|
Forums63
Topics37,583
Posts293,955
Members13,826
| |
Most Online151,614 Nov 14th, 2025
|
|
Currently Online 13812
Topics Created 0
Posts Made 0
Users Online 1
Birthdays 12
|
|
|
|