PDA

View Full Version : [Release] Simple vB powered web page


Brad
01-29-2003, 10:00 PM
Author: Anime-loo
Screenshot: None.

This script is for webmasters that still use .html static pages for their sites. The point of this script is to allow you to be able to edit your html pages via the vB admin cp (templates).

This opens up alot more for anyone useing vB with a html website. Here is a quick list of things you can do with this script:

Back up ALL html pages, they are stored in the database so you no longer have to backup your static html pages then grab your DB.

Block guest/not logged in users from a page.

Quick editing of all pages via vB's template system.

Have pages that change styles based on what the user has selected in their user cp:
--Use all global templates ($header,$footer,$gobutton) in pages.

--Use all replacements in your pages.

I plan on extending this script alot more soon, ATM it was wrote to kill time. :)

Disturbed
01-30-2003, 11:30 AM
many would consider this a hack not a template edit

as i saw lots of hacks like this one @vb.org

Brad
01-30-2003, 11:45 AM
I talked to Saintdog about it yesterday, its fine because it dosent edit any .php files :)

Orfejs
01-30-2003, 03:28 PM
I'll try it tommorow and tell it what went wrong :o)
Are there any bugs noticed?

xeon
01-31-2003, 04:04 PM
I do not currently have any html pages associated with my forum, nor is my forum in a forum directory, rather it's at the domain root. Your directions say to NOT to load the page.php, renamed of course into the forum directory. I am assuming this is to make sure you do not write over a page currently in that directory as your example of index.html to index.php suggests, am I correct? I don't see where any complications that would come into play aside from writing over current php files.

BTW, this looks like a great way for me to add HTML content and yet be able have it integrated within vBulletin. Then I can use online.php and so on for my new pages in addition to other bonuses. Before I do though, I need to figure out a new top navigation setup, especially if I will be adding more links, tis already crowded. BTW, thanks for this it looks like this simple "just wasting time" project might come in handy for me. Any inklings of what you might be adding to it?

Rufus69
01-31-2003, 05:24 PM
hmm....this is like a non hackable portal?

sounds cool, I might install it on my locallhost and see whayt it's like :)

Tony G
01-31-2003, 09:55 PM
Wow non-hackable portal, nice job. :)

Sal Collaziano
02-01-2003, 04:16 AM
This sounds pretty interesting.. Can this work like other portals that have the latest topics, last registered member, featured news and stuff like that on the front page?

alkatraz
02-01-2003, 07:57 AM
Great idea!

Why does it only work with html files and not php? For security reasons?

Rufus69
02-01-2003, 02:09 PM
I bet it will have more stuff like that once v2 comes out ;)

but for now I bet you can add this to it o.o http://www.vbulletintemplates.com/mods/showthread.php?s=&threadid=2649

webrats
02-01-2003, 06:24 PM
would be great if i could add php to it

Brad
02-01-2003, 09:06 PM
You can add php to the file itself, the main goal for this release was to allow a html based site to be editable thru the templates. That dosent mean you can extend it further.

As for the new stuff coming in this script, ive decided to leave it as is for now. Insted im working on a vBhome like project that requires no hacking of the vB php files. I may release it over here upon aproval of Saintdog.

Brad
02-01-2003, 10:03 PM
Originally posted by alkatraz8
Great idea!

Why does it only work with html files and not php? For security reasons?

Php code dose not work in the templates (for version 2.x.x and 1.x.x anyway), so you are limited to html. Php can be done thru one template. phpinclude.

Brad
02-01-2003, 10:06 PM
This sounds pretty interesting.. Can this work like other portals that have the latest topics, last registered member, featured news and stuff like that on the front page?

The new portal im working on will do all that and a bit more, im releaseing a beta by end of the week.

Originally posted by xeon
I do not currently have any html pages associated with my forum, nor is my forum in a forum directory, rather it's at the domain root. Your directions say to NOT to load the page.php, renamed of course into the forum directory. I am assuming this is to make sure you do not write over a page currently in that directory as your example of index.html to index.php suggests, am I correct? I don't see where any complications that would come into play aside from writing over current php files.

BTW, this looks like a great way for me to add HTML content and yet be able have it integrated within vBulletin. Then I can use online.php and so on for my new pages in addition to other bonuses. Before I do though, I need to figure out a new top navigation setup, especially if I will be adding more links, tis already crowded. BTW, thanks for this it looks like this simple "just wasting time" project might come in handy for me. Any inklings of what you might be adding to it?

You are correct, i would hate it if someone overwrote their vB files, thats why the warning is there.

Orfejs
02-02-2003, 10:18 AM
Is there a demo?

xeon
02-03-2003, 03:53 PM
Here's a teeny demo of something I threw together this morning. I am using $bbtitle, $header and $footer, otherwise it's plain ol html via a custom template. This doesn't really show advanced capabilities of this mod or advanced html, but it might give you some idea. For me it seems like a good way to add content easily and be able to control it via the template system in addition to other pros.

http://www.autismtalk.net/whatis.php

Rufus69
02-03-2003, 04:16 PM
nice :)

Drowned
02-04-2003, 01:57 PM
I don't get this mod... I just started learning PHP and I can't figure out how to make it work... i followed the instrucions and the page.php is working but how do I make my html files load $header for example? :(

Brad
02-05-2003, 06:39 AM
Stick it in the custom template.

Tony G
02-05-2003, 08:04 AM
Originally posted by xeon
Here's a teeny demo of something I threw together this morning. I am using $bbtitle, $header and $footer, otherwise it's plain ol html via a custom template. This doesn't really show advanced capabilities of this mod or advanced html, but it might give you some idea. For me it seems like a good way to add content easily and be able to control it via the template system in addition to other pros.

http://www.autismtalk.net/whatis.php

Yes, this is how many people get a vB-powered website. This saves having to create html pages or clones to look like your vBulletin.

Red Blaze
02-05-2003, 01:49 PM
Sorry, about the PM Anime-loo, I barely saw your sig. ^^;;;

But anyway, I was able to set it up, but I got a new problem.


Warning: ChDir: No such file or directory (errno 2) in /home/thesonic/public_html/home.php on line 22

Warning: Cannot add header information - headers already sent by (output started at /home/thesonic/public_html/home.php:22) in /home/thesonic/public_html/admin/functions.php on line 1709


arf?
The page shows correctly, but it says that on the very top.

Brad
02-05-2003, 05:42 PM
Your $path is set wrong, is you vB in your root directory?

Red Blaze
02-05-2003, 06:10 PM
yeah, it is in the root. =/ I set the page.php to home.php. Does it have to be index?

imported_PiotrasG
02-06-2003, 06:49 AM
I also get the same problem help

this is my path

/var/www/html/forum

imported_PiotrasG
02-06-2003, 07:15 AM
i got it i figure it out the path wasnt /var/www/html/forum it was /home/virtual/site10/fst/var/www/html/forum

Sonikku try this :
$template= home your file name has to be home.php
$path = /home/thesonic/public_html

this is my demo not done yet just got the header footer and headinclude in there and text bk bk bk without any html code

http://www.polskieforum.com/forum/reklama.php

Red Blaze
02-06-2003, 03:16 PM
alright! It works great! Thanks alot. :)

Bad Bunny
02-08-2003, 04:15 AM
Works wonderfully. Thank you so much!

I have a question. For any templates I wish to include in it, I can simply put $nameofthetemplate ?

Brad
02-08-2003, 05:06 PM
as is, no. But you can do it with slight modification to page.php.

Open page.php:

--------
find:
--------

$templatesused='$template';

--------------
Replace by: (change nameoftemplate to your custom templates name)
--------------

$templatesused='$template,nameoftemplate';

---------------
Find:
---------------

eval("dooutput(\"".gettemplate("$template")."\");");

----------------
Above it add: (change both instances of 'nameoftemplate' to the templates name.
-----------------

eval ("\$nameoftemplate = \"".gettemplate("nameoftemplate")."\";");

that sould do it.

narusaga
02-08-2003, 05:15 PM
:D good work loo! I installed it on my forums.....works like a charm! :rolleyes:

Bad Bunny
02-09-2003, 09:01 AM
Originally posted by Anime-loo
as is, no. But you can do it with slight modification to page.php.

Open page.php:

--------
find:
--------

$templatesused='$template';

--------------
Replace by: (change nameoftemplate to your custom templates name)
--------------

$templatesused='$template,nameoftemplate';

---------------
Find:
---------------

eval("dooutput(\"".gettemplate("$template")."\");");

----------------
Above it add: (change both instances of 'nameoftemplate' to the templates name.
-----------------

eval ("\$nameoftemplate = \"".gettemplate("nameoftemplate")."\";");


that sould do it.

WOW. Thanks. I have not tried it out yet, but I will.
This means a whole lot to me, and I wanna thank you BIG TIME.

donBLACK
02-11-2003, 11:37 PM
let me see if i understand this, if i install it i can use all of the $variables on on pages other than my board

Rufus69
02-12-2003, 01:33 AM
most of them, yes...

Brad
02-12-2003, 02:22 AM
Originally posted by donBLACK
let me see if i understand this, if i install it i can use all of the $variables on on pages other than my board

you can use

$header
$footer
$gobutton
$bburl
$bbuserinfo[]
{replacements}

And probbly a few mor i can not recall at this time.

Bad Bunny
02-15-2003, 03:27 AM
Is there a way to make the page use one style (other than the default one), and override user's preference?

Brad
02-15-2003, 04:37 AM
Try adding this:

if ((!isset($styleid) or $styleid=="") {
$styleid="$setstyleid";
}

after:

$templatesused='$template';

And this:

// set this to the custom style of the page
$setstyleid = "1";

after:

// Edit this line with the full _path_ to your vBulletin global.php file (not /admin/global.php!!!)
$path = "/path/to/globals/";

Bad Bunny
02-15-2003, 05:02 AM
Parse error on the line with
if ((!isset($styleid) or $styleid=="") {

Bad Bunny
02-18-2003, 11:50 AM
I hate to be a nag, but should I assume that this is currently not possible to force a style on a page?

Brad
02-18-2003, 04:40 PM
I look into it, and add a few more things when i release version 2 (coming after loo-portal). For now you can just link the page like so:

www.yoursite.com/page.php?styleid=*number of style id here*

Bad Bunny
02-19-2003, 04:54 AM
Hmmm. I will have to wait I guess. I do not allow changing of styles by members. Different areas change styles by default. So this does not seem to work for me.

kitzzy
05-15-2003, 10:36 PM
I am having a problem, it seems that all of a suddent the access masks on this stopped working because all pages that I have that say no to guests are still viewable by guests :( Any ideas of what could be causing this?

Asterik
10-21-2003, 03:04 AM
hmm i tried to add other templates the way loo said but she ain'ta workin images/smilies/frown.gif Help? Also, http://www.plugspark.com none of the images show in the $header thing. i checked where its tryin 2 get'em and its not goin into the /forums folder. its just doin like... http://www.plugspark.com/images/.... which isn't there... it needs to look in the /forums/images

slim cutty
07-15-2005, 04:56 AM
Demo... screen shots... PLEase!
lol

Brad
07-15-2005, 09:17 AM
I'm sorry but I stoped work on this script years ago :)