vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Forum Home Enhancements - [YUI] Tabbed Forum Home (https://vborg.vbsupport.ru/showthread.php?t=197871)

TomasDR 12-03-2008 11:58 PM

Here's the file.

PHP Code:

<?php 
// ######################## SET PHP ENVIRONMENT ########################### 
error_reporting(E_ALL & ~E_NOTICE); 
// ##################### DEFINE IMPORTANT CONSTANTS ####################### 
// change the line below to the actual filename without ".php" extention. 
// the reason for using actual filename without extention as a value of this constant is to ensure uniqueness of the value throughout every PHP file of any given vBulletin installation. 
define('NO_REGISTER_GLOBALS'1);
define('THIS_SCRIPT''spanish');  
// #################### PRE-CACHE TEMPLATES AND DATA ###################### 
// get special phrase groups 
$phrasegroups = array(); 
// get special data templates from the datastore 
$specialtemplates = array(); 
// pre-cache templates used by all actions 
$globaltemplates = array( 
        
// change the lines below to the list of actual templates used in the script 
        
'spanish_template1'
); 
// pre-cache templates used by specific actions 
$actiontemplates = array(); 
// ########################## REQUIRE BACK-END ############################ 
require_once('./global.php'); 
require_once(
'./includes/functions_forumdisplay.php');
// #################### HARD CODE JAVASCRIPT PATHS ######################## 
$headinclude str_replace('clientscript'$vbulletin->options['bburl'] . '/clientscript'$headinclude); 
// ######################################################################## 
// ######################### START MAIN SCRIPT ############################ 
// ######################################################################## 
$navbits = array();  
// change the line below to contain whatever you want to show in the navbar (title of your custom page) 
$navbits[$parent] = 'Spanish Lesson'
$navbits construct_navbits($navbits); 
// change the line below to contain the name of the actual main output template used in your script 
eval('print_output("' fetch_template('spanish_template1') . '");'); 
?>


s810car 12-04-2008 12:04 AM

tried to turn display errors off, still had issues, but let me know if you have some other config that may help

King Kovifor 12-04-2008 12:27 AM

OK, I was able to reproduce the Content Encoding Error (or Bree was) and we know it has something to do with class_yui.php - as was stated earlier in the thread - and I need to figure out why it is working that way.

s810car, turning the errors off gives you the content encoding error still or is it still saying Warning: at the beginning of everything?

CHIPIT 12-04-2008 01:20 AM

I can confirm I have display errors turned on in php.ini, however an error still occurs when submitting the edited template... as others have said the fix isn't working, though with s810car's modified conditional
PHP Code:

<if condition="(THIS_SCRIPT == 'indexTAB' AND (in_array($forum['forumid'], $GLOBALS[tabcats]) OR in_array('all', $GLOBALS[tabcats]))) OR (THIS_SCRIPT == 'forumdisplay')"

no errors. The parenthesis are what made it work, the quotes around forumid didn't make a difference. The All Forums module still won't display, though that may just be an error on my end since I haven't heard anyone else mention that.

s810car 12-04-2008 01:36 AM

i get both, I get encoding errors visiting index.php, and the warnings on tabindex.php, or when i edit that conditional. I can play with the conditional to make it not error during save, but it doesnt fix it and still errors visiting tabindex

as far as the modifying chipit mentions, I wonder if its the order of the conditionals as well, or that should it be $GLOBALS[tabcats] or $tabcategories?

CHIPIT 12-04-2008 01:58 AM

http://www.smnlikdat.org/project.php?issueid=16#note38

I modified the new conditional with $tabcategories to include your parenthesis fix
PHP Code:

<if condition="(THIS_SCRIPT == 'indexTAB' AND (in_array($forum['forumid'], $tabcategories) OR in_array('all', $tabcategories))) OR (THIS_SCRIPT == 'forumdisplay')"

and like you said, no more errors in the template manager or forums page, but tabindex.php returns the error with the patch.

s810car 12-04-2008 02:11 AM

im gonna be getting my production server settings files (php.ini etc.) see if I have better luck using my live setting, if i do at least I could have a source to compare to, ill update once i try it out

TomasDR 12-04-2008 02:27 AM

Quote:

Originally Posted by King Kovifor (Post 1678144)
2. Can you post your module file?

Sorry I was on the phone and running out the door, I read "Template".:D

Here's the php file.

All the extra pages I have are pretty much a cookie cutter copy of the thread I posted in my original post. The only difference with my spanish.php file is that there is javascript in the Template. The other Templates are all html.

rob01 12-04-2008 03:26 AM

nvm understod wrong


i have a question

if i cant find this : <a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumbit_$forumid')"><img id="collapseimg_forumbit_$forumid" src="$stylevar[imgdir_button]/collapse_tcat{$collapseimg_forumid}.gif" alt="" border="0" /></a>


and i have this errors:

Warning: in_array() [function.in-array]: Wrong datatype for second argument in [path]/includes/functions_forumlist.php(395) : eval()'d code on line 1

Code:

Database error in vBulletin 3.7.4:

Invalid SQL:

                SELECT
                        user.username, (user.options & 512) AS invisible, user.usergroupid,
                        session.userid, session.inforum, session.lastactivity, session.useragent,
                        IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid
                FROM vbb_session AS session
                LEFT JOIN vbb_user AS user ON(user.userid = session.userid)
                WHERE session.lastactivity >;

MySQL Error  : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 7
Error Number  : 1064
Request Date  : Thursday, December 4th 2008 @ 12:33:13 AM
Error Date    : Thursday, December 4th 2008 @ 12:33:13 AM
Script        : bbs/tabindex.php?tID=1&tabcat[]=128&
Referrer      : bbs/index.php
IP Address    :
Username      :
Classname    : vB_Database
MySQL Version : 5.0.51a-community

because of:

vbb_adminlog Check Error: Found 8704 keys of 8705
vbb_adminlog Check Error: Corrupt

any idea? :S

CHIPIT 12-04-2008 03:47 AM

Quote:

Originally Posted by rob01 (Post 1678237)
thanks CHIPIT, but still i think it might cause this error

I didn't say it addresses the issue, the patch fixes one bug while causing another, however using
PHP Code:

<if condition="(THIS_SCRIPT == 'indexTAB' AND (in_array($forum['forumid'], $tabcategories) OR in_array('all', $tabcategories))) OR (THIS_SCRIPT == 'forumdisplay')"

as the forumbit conditional seems to temporarily fix things, only issue is that won't fix the all forums module.


All times are GMT. The time now is 07:34 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.06284 seconds
  • Memory Usage 1,764KB
  • 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
  • (4)bbcode_php_printable
  • (2)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
  • (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