vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   WebTemplates 3.x: VB Integrated Content Management System (https://vborg.vbsupport.ru/showthread.php?t=76422)

DarkDestinyD 07-10-2005 09:18 AM

im getting this error when i view my test page and a similar error when i make a new page and try to view it any ideas

Fatal error: Call to undefined function: array_key_exists() in /nfs/cust/9/46/70/607649/web/GX/view.php on line 433

Logician 07-10-2005 01:48 PM

Quote:

Originally Posted by DarkDestinyD
im getting this error when i view my test page and a similar error when i make a new page and try to view it any ideas

Fatal error: Call to undefined function: array_key_exists() in /nfs/cust/9/46/70/607649/web/GX/view.php on line 433

Upgrade your PHP to version 4.1.0 (or higher)
OR
replace all "array_key_exists" as "key_exists" in the scripts.

bulbasnore 07-17-2005 11:02 PM

First off, this looks like an awesome piece of work; congrats on your skills Logician.

I'd like to see if anyone here, with experience with webtemplate can tell me if it will help me implement a new feature on our site.

Our Site
vB3.0.7 with vBaCMPS1.0.1.
I have some custom & tweaked modules running in CMPS and we have the gallery. Great system.

New Feature
We're putting up a database driven guide with over 3000 entries for our members. You select the group to view with one form, then get back a page of results to update with the return and finally submit that back to a third form which gives your result. I'm using ADODB with DreamweaverMX/PhaKT to create the PHP database code. The forms are working fine and doing what I want.

Problem
Now the time is come to integrate with vB! However, vB isn't going to let me run php code.

OK, vBaCMPS module time! Well, that works for the first selection, but once I post that selection I have to drop out of vBaCMPS. No way to post back to it.

OK, require global.php, then load my other php code. Works great for the first form, restricts access, etc. However, global.php prevents you from accepting post/get input.

Questions
  1. Can I just plunk my php database query and HTML generation code in the include section of webtemplate?
  2. If so, how do I pick up the post info on an incoming form submission, and get it to that code I plunked in?
  3. My php code talks to an external database. Is it just webqueries that are limited to the vB database, or does webtemplate/vb block even non-vb/template queires from included php code?
  4. Am I better off to just try to make my own cookie from vB login and keep my pages external to vB/CMPS/webtemplate?

Well, if you got this far, thanks for reading. I'm amazed at how cool vB is; its a new world for me, but it really is saving me tons of time and helping get features out to our members. It just has some limits I'm not used to in free-coding (simple though mine is).

Cheers,
'snore

damonh 07-17-2005 11:24 PM

Fantastic!!!!!
Now I jsut need to make them work for each user as they log in. Two thumbs up!
Installed Clicked!

Logician 07-18-2005 04:59 AM

Quote:

Originally Posted by bulbasnore
[*]Can I just plunk my php database query and HTML generation code in the include section of webtemplate?[*]If so, how do I pick up the post info on an incoming form submission, and get it to that code I plunked in?[*]My php code talks to an external database. Is it just webqueries that are limited to the vB database, or does webtemplate/vb block even non-vb/template queires from included php code?[*]Am I better off to just try to make my own cookie from vB login and keep my pages external to vB/CMPS/webtemplate?

What you are trying to achieve is really sophisticated and I can not say if you can do it with webtemplates or not without trying it. However I'd urge you to try. Nothing to lose and it may work.

On theory it sounds like "doable". However my concern is that there can occur many unexpected drawbacks when you integrated your code. Some can be even unrelated to webtemplates: Eg. your variables can clash with vbulletin variables etc. So no way to say whether it will work or not without trying it.

As for your questions:
1- yes, sounds ok. If you put it into vb phpinclude template and it worked (except getting GET/POST VARIABLES successfully), it will work in phpinclude template of webtemplate.
2- You can use a webquery for this and use the phpinclude field of the webquery for the postid variable your code passes. It will return you the post info. However it will return it to the webtemplate, not your code (which is inside phpinclude of webtemplate!) so I don't know if it is ok with you.
3-webqueries can only query vb database. But if you use your own DB connection commands in your phpinclude field of webtemplates, they are not blocked so your commands can query other dbs. (again: provided that this strategy worked in the default phpinclude field of vb! If it does not work in vb's phpinclude field, it will not work in webtemplates's phpinclude field)
4- If it does not work, I still don't suggest you to use a seperate autentication for your application. I think your path should be copying vb global.php into another file, remove GET/POST variable blocking of it in your new file and include it in your application to simulate vb authentication. This sounds more logical. You can check webtemplates source code to see how it manages to accept variables vb global.php blocks.

Inzagi 07-18-2005 09:24 PM

Is there a version of the hack for vb 3.5 or is it planned ?

bugzy 07-19-2005 11:31 PM

This like an article system?

Spinball 07-23-2005 07:55 PM

The number of page views doesn't seem to be incrementing for my webtemplates.
I have the 'Count page visitors?' set to 'Yes' and the 'Logged Visitors' to 0.
Any idea what's wrong?

Logician 07-25-2005 07:55 AM

Quote:

Originally Posted by Spinball
The number of page views doesn't seem to be incrementing for my webtemplates.
I have the 'Count page visitors?' set to 'Yes' and the 'Logged Visitors' to 0.
Any idea what's wrong?

Good catch of a bug!

Here is the fix:

Edit "view.php", find:
PHP Code:

$DB_site->query("UPDATE $WT_DB_TemplateTable SET  lastvisitorid='$bbuserinfo[userid]', lastvisittime='".time()."' WHERE wtid='$WT[wtid]'"); 

replace it as:
PHP Code:

$DB_site->query("UPDATE $WT_DB_TemplateTable SET pagecount=pagecount+1, lastvisitorid='$bbuserinfo[userid]', lastvisittime='".time()."' WHERE wtid='$WT[wtid]'"); 


slim cutty 07-25-2005 02:38 PM

$DB_site->query("UPDATE $WT_DB_TemplateTable SET lastvisitorid='$bbuserinfo[userid]', lastvisittime='".time()."' WHERE wtid='$WT[wtid]'");

in the above line that you were to replace you made a little typo you made a mistake and put this instead

$$DB_site->query("UPDATE $WT_DB_TemplateTable SET lastvisitorid='$bbuserinfo[userid]', lastvisittime='".time()."' WHERE wtid='$WT[wtid]'");

Thanks for the bug fix hope you update the view.php file before someone else downloads


All times are GMT. The time now is 09:29 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.02796 seconds
  • Memory Usage 1,757KB
  • 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
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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