vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   WebTemplates v.0.1 (Old Version) (https://vborg.vbsupport.ru/showthread.php?t=36419)

Craigr 03-10-2003 12:10 PM

Yes the hack is great. I'm running the majority of my site using it.

http://www.steven-seagal.net

Craig :D

refertech 03-10-2003 12:12 PM

Good looking site you got there Craig. :D

refertech 03-11-2003 12:07 AM

Logician I just got the hack install and I wanted to say again. Man this rocks. Thank you for offering this. So many ideas, I dont konw where to start. :)

Mark

Craigr 03-11-2003 08:49 AM

Quote:

Originally posted by refertech
Good looking site you got there Craig. :D
Thanks.

Craig

jbear6 03-13-2003 02:29 AM

Quote:

Originally posted by Logician

Try this one:

Edit online.php, find:
PHP Code:

  }
  
$userinfo[time] = vbdate($timeformat,$userinfo[lastactivity]); 

Before that add:

PHP Code:

    // Logician WebTemplates Hack
      
if (preg_match("/(pg=)(.*)(&)/siU"$userinfo[location], $l_match1) OR preg_match("/(pg=)(.*)/siU"$userinfo[location], $l_match2))
    { 
    if (
$l_match1[2]) {$lmatch=$l_match1[2];} else {$lmatch=$l_match2[2];}
      
$userinfo[where]= 'Reading Webtemplate: <a href="show.php?pg='.$lmatch.'" target="_blank">'.$lmatch.'</a>';
    }
    
// Logician WebTemplates Hack 

Enjoy..

First off....Great Hack!
Everytime I add a new page to our website, I use this hack. Thanks again for all your time and effort.

I added the code above to online.php, and it works fine if you view "who's online" as an admin. When I view "who's online" as a registered member though, I see "Reading Webtemplate:", but nothing following the colon. For instance as an admin, I see "Reading Webtemplate: news", but as a registered user I see just "Reading Webtemplate:". I'm stumped :)

Thanks
Jbear6

Logician 03-13-2003 09:56 AM

Quote:

For instance as an admin, I see "Reading Webtemplate: news", but as a registered user I see just "Reading Webtemplate:".

Adding this line:

PHP Code:

 if ($bbuserinfo[usergroupid] != 6) {$userinfo[location] = htmlspecialchars(stripslashes(replacesession($userinfo[location])));} 

Before line

PHP Code:

 if (preg_match("/(pg=)(.*)(&)/siU"$userinfo[location], $l_match1) OR preg_match("/(pg=)(.*)/siU"$userinfo[location], $l_match2)) 

might help..

jbear6 03-13-2003 10:26 AM

That worked! UDA MAN Logician!

Thanks again,
Jbear6

Keichii 03-14-2003 01:54 PM

Umm. i'm a newbie.. so i'm not sure if this is possible. Can show.php be put in a directory other than the forums.. and if it can't is there anywayt to do that..

Logician 03-14-2003 06:50 PM

Quote:

Today at 05:54 PM Keichii said this in Post #208
Umm. i'm a newbie.. so i'm not sure if this is possible. Can show.php be put in a directory other than the forums.. and if it can't is there anywayt to do that..
I didnt test it myself either, it may or may not work.. Just give it a try, but don't forget to add the line
PHP Code:

chdir('/usr/local/apache/sites/yourforumdir/'); 

at the begining.

BTW. IMO this shouldn't be very crucial. It's just the URL that matters so the hack will work in the same way even if its in forum dir or not.. My 2 cents..

Keichii 03-14-2003 07:49 PM

yay it works ^__^

if i put the show.php in a different directory will it slow down the page loading time by any chance?

Logician 03-15-2003 06:53 AM

nope performance will not change.. Enjoy

refertech 03-15-2003 02:25 PM

Some reason when i call the template i just created I keep getting the follwing:

Error Message
The page you requested does not exist!

Please check the address you want to visit. If you arrived this page by clicking a link inside this site, you may notify the Site Administrator about the broken link. Thank you!


Edit: Never mind I got it. I was being a dope. :)

Craigr 03-15-2003 03:27 PM

Quote:

03-13-03 at 04:29 AM jbear6 said this in Post #205

I added the code above to online.php, and it works fine if you view "who's online" as an admin. When I view "who's online" as a registered member though, I see "Reading Webtemplate:", but nothing following the colon. For instance as an admin, I see "Reading Webtemplate: news", but as a registered user I see just "Reading Webtemplate:". I'm stumped :)

Thanks
Jbear6

I didn't even notice this. But the fix works great.

Thanks again Logician.

Craig

Intex 03-30-2003 09:58 AM

Logician - Nice Hack :cool:.

I have a few points to note:


Installation

On initial installation I received the following errors (even though everything seemed to go ok:


Error on Page 1:

Warning: Undefined index: p in c:\program files\apache group\apache\htdocs\forum\webtemplates_install.php on line 74


Error on Page 4:

Warning: Undefined variable: pagetitle in c:\program files\apache group\apache\htdocs\forum\webtemplates_install.php on line 312


As I mentioned the installation and testing afterwards suggests this worked ok anyway, so not sure how relevant those errors are.


Installation Documentation

Just a small point really, you mention in your installation instructions about getting the additional help relating to the hack, referencing:

To learn how to use the hack, please call {YOUR FORUM URL}/show.php?pg=Webtemplatehelp and {YOUR FORUM URL}/show.php?pg=Webqueryhelp files

I believe these should be pointed to:

show.php?pg=webtemplate_help and show.php?pg=webquery_help, respectively (with the forum path of course).



Style Issue

Although your test page loads successfully, my header and footer components don't show up. I'm not sure whether this is by design or not.

Of course it was easy for me to go to my relevant style and copy the code there which sorted it fine, but what happens if people have multiple styles.

Is there any way to point the webtemplates header and footer templates to their selected or default style?


I'll have a play with it in more detail now. Keep up the good work :cool:.

Logician 03-30-2003 06:09 PM

Quote:

Today at 01:58 PM Intex said this in Post #214

Style Issue

Although your test page loads successfully, my header and footer components don't show up. I'm not sure whether this is by design or not.

Of course it was easy for me to go to my relevant style and copy the code there which sorted it fine, but what happens if people have multiple styles.

If you put $header and $footer variables to any webtemplate, it's suppose to insert your header and footer there. Doesn't it act so?

ryancooper 03-31-2003 04:31 PM

Is it possable to have individual pages

EX: http://myURL/show.php?pg=whoareyou = Viewing who are you page

http://myURL/show.php?pg=menus = viewing Menus page

etc . . .

work with Firefly's Add Who's Online locations from Admin CP hack? https://vborg.vbsupport.ru/showthrea...threadid=32849

Thanks!!

Logician 04-01-2003 07:50 AM

Quote:

Yesterday at 08:31 PM ryancooper said this in Post #216
Is it possable to have individual pages

EX: http://myURL/show.php?pg=whoareyou = Viewing who are you page

http://myURL/show.php?pg=menus = viewing Menus page

etc . . .

work with Firefly's Add Who's Online locations from Admin CP hack? https://vborg.vbsupport.ru/showthrea...threadid=32849

Thanks!!

If what you are asking is to display webtemplate viewing in who is online, I've already given the code in this thread a few posts above.

ryancooper 04-01-2003 11:15 AM

Quote:

Yesterday at 09:50 PM Logician said this in Post #217

If what you are asking is to display webtemplate viewing in who is online, I've already given the code in this thread a few posts above.


Awesome that was a lot easier than adding each page. Thanks!!

WoodiE 04-06-2003 10:04 PM

I get this error:

Parse error: parse error, unexpected ',' in /home/rcnitro/public_html/forum/online.php on line 295

When I use Logician's who' online mod as listed above. I'm using vb 2.2.8

-WoodiE

Craigr 04-08-2003 02:40 PM

Quote:

Yesterday at 12:04 AM WoodiE said this in Post #219
I get this error:

Parse error: parse error, unexpected ',' in /home/rcnitro/public_html/forum/online.php on line 295

When I use Logician's who' online mod as listed above. I'm using vb 2.2.8


-WoodiE

Make sure you copy all the code to the exact location in online.php

If you miss something it may not work. It works great for me with vb 2.2.9

Craig

Logician 04-09-2003 06:41 AM

Quote:

04-07-03 at 02:04 AM WoodiE said this in Post #219
I get this error:

Parse error: parse error, unexpected ',' in /home/rcnitro/public_html/forum/online.php on line 295

When I use Logician's who' online mod as listed above. I'm using vb 2.2.8

I believe if you read here (especially part ADD AFTER, ADD BEFORE), your problem will be cured..

amp2000 04-11-2003 02:22 PM

This looks like a great hack, has anyone gotten it to work with VB 2.3.0 ??

Thanks
amp2000

EDIT: Nevermind, I tried it and it & it seems to work with 2.3.0 :p

Great work..

amp2000

ryancooper 04-15-2003 06:38 PM

Quote:

02-26-03 at 05:51 AM Craigr said this in Post #197
Thanks for that, i'll give it a go.

Craig


I get the error when I add the above. . .

Parse error: parse error, unexpected ',' in /home/talkdis/public_html/forums/online.php on line 315

The Piper 04-24-2003 03:06 AM

I've been using Logician's WEBTEMPLATES hack for the longest time for several pages on my website, it's one of the greatest hacks ever developed (along with vbHome (lite) and vbMicroStats, IMHO). However, I've never really liked the format of the URLs with the WEBTEMPLATES hack.

URLs right now look like this: http://www.pinkfloydfan.net/show.php?pg=books

The problem is, search engines, specially Google, don't seem to like URLs with parameters passed through them, such as the "?pg=books" part.

So, after some research, I found out how to use Apache's .htaccess to have search-engine friendly links.

First, make sure your server has the Apache module mod_rewrite installed..

Open .htaccess, and add:
Code:

RewriteEngine on
RewriteRule ^books\.php$ show.php?pg=books [NC]
RewriteRule ^posters\.php$ show.php?pg=posters [NC]

You can change the first part (^books\.php$) to whatever file name you would like your webtemplate to have, including a .html extension, such as ^this_is_my_books_page\.html$. Add as many lines as you wish/need. I have as many lines as webtemplates, so now all of them are search-engine friendly.

Also, make sure that if you already have a "RewriteEngine on" line on your .htaccess, that you don't add a second one.

Check it out for yourself: http://www.pinkfloydfan.net/books.php. It takes you to the same WEBTEMPLATE as the previous URL.

Just thought I'd share this with you. Logician, again, congrats on this great hack. I hope you keep on developing it. One thing I'd like to see that shouldn't be too hard to implement is a "Search" function for WEBTEMPLATES, much like we have for the Templates on VB's Admin CP.

I'm also having problems with the Who's Online hack you just posted a few posts back, much like other users. Would you please be so kind as to double check to see if your instructions are precise? Thanks a lot!

Craigr 04-24-2003 10:34 AM

Thanks The Piper, i will have to add that, i've probably got about 100 templates now, but it will be worth it if they are picked up by google.

Craig

Logician 04-24-2003 01:53 PM

To show webtemplates properly in who is online page:

Logician 04-24-2003 01:58 PM

Quote:

Just thought I'd share this with you.
Piper thx for the nice tip.. I'll link it in the first post.

Quote:

hope you keep on developing it.
Yes I have intentions to develop it (actually rewrite it!) after vb3 is released.

Quote:

I'm also having problems with the Who's Online hack you just posted a few posts back, much like other users. Would you please be so kind as to double check to see if your instructions are precise?
My instructions are correct. I rechecked and it is working ok here. But I believe people are missing some basic hacking rules like when said "add after" or "add before", it means add one line above or below, NOT to the same line.

Anyway to avoid such misunderstandings, I rephrased my instructions and published one post above. It should be clearer now.. :)

Enjoy..

Craigr 04-24-2003 02:01 PM

Quote:

Today at 02:58 PM Logician said this in Post #227
Yes I have intentions to develop it (actually rewrite it!) after vb3 is released.

Wow, can't wait. I wasn't going to upgrade to vb3 because i would probably lose this hack, 90% of my site is powered by it.

So thank for the good news. :banana:

Craig

The Piper 04-24-2003 03:33 PM

Quote:

Piper thx for the nice tip.. I'll link it in the first post.
Always a pleasure, never a chore. :)
Quote:


Yes I have intentions to develop it (actually rewrite it!) after vb3 is released.

That's great to hear, Logician. One more reason to upgrade to vb3, as several of my main pages are driven by WebTemplates.

Quote:

My instructions are correct. I rechecked and it is working ok here. But I believe people are missing some basic hacking rules like when said "add after" or "add before", it means add one line above or below, NOT to the same line.
I just used your new instructions, and it is working like a charm! :) Thanks for that!

leviw 04-28-2003 03:17 AM

Installed easily in about 10 minutes, no problems at all using vb 2.3.0

Playing around with the options now, this has a lot of potential!

leviw 04-28-2003 10:01 PM

I'm having some trouble getting templates to work properly.

Heres what I have so far:

I went to Add Webtemplate, entered all info as "demo", page count 0, template info is: Hello $s2sheader

I went back into Add Webtemplate and made one called s2sheader, page count 0, info is: world.
Then I load example. com/forum/show.php?pg=demo

It loads a blank white page that says "Hello"

So.. the $s2sheader is not loading properly. What gives?

I also tried copying the webtemplate as a normal template, but same results. What am I doing wrong?

Thanks in advance!

leviw 04-29-2003 05:25 AM

After fiddling with it I havnt gotten any further. None of my templates will load.

Is there something I need to do to prep or preload the template?

I dont understand why the premade $footer template will work, but my template right next to it wont. There must be something else at work here but I'm not seeing it. Help!

Logician 04-29-2003 07:02 AM

Quote:

Today at 09:25 AM leviw said this in Post #232
I dont understand why the premade $footer template will work, but my template right next to it wont. There must be something else at work here but I'm not seeing it. Help!
The hack does not have "template-in-template" feature except footer and header templates. (at least yet, I may or may not add this feature to the next version, still pondering about it) So this is why your first template was not displayed inside your second one.

glo 04-29-2003 12:13 PM

Hi Logician,

Is this hack compatible with 2.3.0?

Logician 04-29-2003 01:59 PM

yes it is glo

leviw 04-29-2003 10:59 PM

Quote:

The hack does not have "template-in-template" feature except footer and header templates.
Bummer, that was a huge reason I wanted to use WebTemplates.

Koutaru 04-29-2003 11:58 PM

just wondering

How could I show users browsing this page. For example (like this thread):

(Users Browsing this Thread: Koutaru, Another User, User 3)

Instead of Thread..

(Users Browsing this Page: Koutaru, Another User, User 3)

Or maybe you could point me in the direction of adding this little addon?

gmarik 05-02-2003 05:22 AM

You should work on the screenshot more than on the code - tip, tip!

glo 05-02-2003 06:33 AM

Hi Logician,

Could you please tell me if you hack could replicate my main page ?

And where are some live examples? preferably in English

Logician 05-02-2003 07:00 AM

replicate?

After installing the hack, you can simply copy/paste the source code of your page into a webtemplate and your page will be a webtemplate then. Is this what u are asking?

However as mentioned in the hack thread this hack is not coded for "site main page" altough some people use it for their main pages too.


All times are GMT. The time now is 08:41 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03646 seconds
  • Memory Usage 1,860KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (5)bbcode_php_printable
  • (20)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete