php forum
php mysql forum
php mysql smarty
 
Topic Options
#202068 - 01/01/04 08:30 PM [6.7] [beta] Php Style
AllenAyres Administrator Offline
I type Like navaho

Registered: 03/10/00
Posts: 25408
Loc: Texas

   [6.7] [beta] Php Style to Del.icio.us Add to del.icio.us
  Digg [6.7] [beta] Php Style Digg it
Modification Name: Php Style

Author(s): AllenAyres

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

Demo: none

Requirements: ubb.classic™ 6.7

Download Link: http://www.ubbdev.com/ubb/upload/00000494/php_style.zip

Credits: Burak for lots of assistance thumbsup and Charles Capps for pointers

Rather easy to install and run. It's of 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.
_________________________
- Allen wavey
- What Drives You?

Top
#202069 - 01/02/04 11:34 AM Re: [6.7] [beta] Php Style
AllenAyres Administrator Offline
I type Like navaho

Registered: 03/10/00
Posts: 25408
Loc: Texas
Here is suggested code for an index.php page:

Code:
<?PHP

/*
        ubb.php index
*/
	// ----------------- EDIT ----------------------
	// Path to vars_config.inc.php
		$varspath = "your/ubb/vars/path";
	// ---------------------------------------------
	// load required files
$Header = addslashes($Header);
        require "{$varspath}/vars_config.inc.php";
        require "{$varspath}/vars_style.inc.php";

echo <<<UBBPRINT
<html><head>

$HeaderInsert

</head>
<body bgcolor="$BGColor" text="$TextColor" link="$LinkColor" vlink="$VisitedLinkColor" alink = "$ActiveLinkColor">
<!--begin header-->

$Header

<!--end header-->
<!--begin footer-->

$Footer
UBBPRINT;
?>
<!--end footer-->


</body></html>
_________________________
- Allen wavey
- What Drives You?

Top
#202070 - 02/11/04 02:29 PM Re: [6.7] [beta] Php Style
Ian Spence Offline
Master Hacker

Registered: 01/25/03
Posts: 3765
Loc: Saint Johns, PA
Allen, in the next version could you make it so it updates the file if it already exists? You have it so if it already exists, it does nothing, but a lot of people change their styles
_________________________
Code monkey like Fritos

Top
#202071 - 02/11/04 05:26 PM Re: [6.7] [beta] Php Style
Ian Spence Offline
Master Hacker

Registered: 01/25/03
Posts: 3765
Loc: Saint Johns, PA
Allen, I have to say I love this mod. I've been constantly editing my main page so it matched any changed I made to my forums, but with a little editing of your mod, I have it adding my copyright notice, my ubb version, the main buttons line, and $show_logout

The $TableTop and $TableBottom variables are really saving me some constant typing compared to adding in $TBT by hand Thanks to this mod, I'm finally converting my main page over to entirely PHP
_________________________
Code monkey like Fritos

Top
#202072 - 02/11/04 06:47 PM Re: [6.7] [beta] Php Style
AllenAyres Administrator Offline
I type Like navaho

Registered: 03/10/00
Posts: 25408
Loc: Texas
glad it's working for you smile
_________________________
- Allen wavey
- What Drives You?

Top


Moderator:  Charles, Gizmo 
Top Posters Last 30 Days
AllenAyres 18
Gizmo 12
sirdude 6
GEN 3
tackaberry 2
Philipp 2
willing 2
Who's Online
1 Registered (zahqan), 47 Guests and 10 Spiders online.
Key: Admin, Global Mod, Mod
Shout Box

Latest Posts
Team UBBDev Rides Again!
by Gizmo
Yesterday at 11:45 PM
Multiple Identity Detector
by MattUK
Yesterday at 04:10 PM
[7.3.x] ubb.links
by AllenAyres
08/26/08 09:57 AM
Installing FlashChat with 7.3
by Gizmo
08/23/08 05:36 AM
[7.2.1] - Naked shoutbox
by Iann128
08/22/08 07:27 PM
Nice Ajax Chat
by M4D
08/21/08 10:02 PM
51-card NVIDIA folding rig cranks out 265,200 ppd
by AllenAyres
08/13/08 10:10 PM
New Mods
Installing FlashChat with 7.3
by Paug
08/23/08 12:14 AM
[7.x] AddThis - Social Networking
by Gizmo
08/01/08 01:30 AM
[7.3.x] ubb.links
by AllenAyres
06/20/08 11:50 PM
[7.3] Dissallow quotes more then 3 levels deep
by blaaskaak
06/09/08 09:01 AM
[7.2.1] - Naked shoutbox
by sirdude
08/17/07 10:36 PM
Newest Members
welcomeback1, Paug, Tim Keating, anscers, Murphdog
13324 Registered Users

 

 

 
fusionbb message board php hacks