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)
-   -   vBengine (https://vborg.vbsupport.ru/showthread.php?t=37289)

el3m3nt 04-10-2002 10:00 PM

vBengine
 
Latest Version: 1.1

Yesterday evening i wrote this hack instead of studying math :D. Actually the code is not really difficult, but the hack itself can make many things much easier.

First feature: you can create new php-files thru your admin cp. You can choose if you wanna include the header and footer template and if you wanna create a new template for the content.
Screenshot 1: http://partylife.ch/misc/vbengine1.jpg

Second feature: The script reads all files in your forum and admin directory and you can choose one for editing. So you can edit every file thru the admin cp. This can be usefull for changing small things. You can also choose if you want a backup of the file you are editing.
Screenshot 2: http://partylife.ch/misc/vbengine2.jpg
Screenshot 3: http://partylife.ch/misc/vbengine3.jpg


Installation
Everything is clearly explained in the readme file.


Download
Voil?: http://partylife.ch/misc/vBengine1.1.zip


Note!
I'd really like to get every feedback you guys can give me. Also post bugreports and suggestions to improve this script. If you have installed this hack, pls click on the install button to receive updates thru email. Thank you :).

BigJohnson 04-11-2002 09:49 AM

nice hack i'll install it later

Harvey 04-11-2002 10:10 AM

great idea.

2 month ago I wrote a simple editor but I canceles the project because of needing write access to the directory.

PS: you put a wrong readme.txt into the zip.

el3m3nt 04-11-2002 10:17 AM

ehm.. well you cannot get around the access thing. so if somebody wanna use this .. he has to give the write-access.

whats wrong with the readme-file? =)

RDX1 04-11-2002 10:52 AM

wow very nice, ill install it later also :)

andrew67 04-11-2002 10:58 AM

I tried this and it worked fine except the php file it created was empty except for calls to the header, footer & engine templates... It also has a parse error when I try and load it, whether I create templates or not...

el3m3nt 04-11-2002 11:01 AM

ehm.. well did you create a new template or just add some code/text?

could you post the content of the created file?

RDX1 04-11-2002 11:14 AM

i just thought of a security issue, since vb doesnt allow people to reset the admin log via the ACP and makes them edit the config file, this will allow people to reset the admin log

el3m3nt 04-11-2002 11:25 AM

Quote:

Originally posted by andrew67
PHP Code:

<?php
error_reporting
(7);

require(
"./global.php");

eval(
"\$header = \"".gettemplate('header')."\";");
eval(
"\$footer = \"".gettemplate('footer')."\";");
eval(
"\$headinclude = \"".gettemplate('headinclude')."\";");

$title="TEST";
eval(
"\$page = \"".gettemplate('test')."\";");

eval(
"dooutput(\"".gettemplate('engine')."\");");

?>


If I dont create a template I get this error:
Parse error: parse error in /home/virtual/site2/fst/var/www/html/forums/test.php on line 13


If I create a template I get this error:
Warning: SAFE MODE Restriction in effect. The script whose uid is 48 is not allowed to access ./global.php owned by uid 504 in /home/virtual/site2/fst/var/www/html/forums/test.php on line 4

have you created the engine template? the second error i dont really know. there seems to be several userids.. so the test.php must have the uid 504 too to get access.. but ehm.. sorry, i dont really know :/.

andrew67 04-11-2002 11:25 AM

Ok I got rid of the errors but now it just makes a blank page...

This is the php:

PHP Code:

<?php
error_reporting
(7);

require(
"./global.php");

eval(
"\$header = \"".gettemplate('header')."\";");
eval(
"\$footer = \"".gettemplate('footer')."\";");
eval(
"\$headinclude = \"".gettemplate('headinclude')."\";");

$title="TEST";
eval(
"\$page = \"".gettemplate('test')."\";");

eval(
"dooutput(\"".gettemplate('engine')."\");");

?>

and this is the html it generates:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=windows-1252"></HEAD>
<BODY></BODY></HTML>



All times are GMT. The time now is 03:04 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.01157 seconds
  • Memory Usage 1,748KB
  • 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
  • (2)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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