vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Portal Software - WebTemplates 4.x: VB Integrated CMS (Content Management System) (https://vborg.vbsupport.ru/showthread.php?t=250202)

Logician 07-11-2013 05:19 PM

Quote:

Originally Posted by Muhammad Rahman (Post 2433133)
try install in vB 4.2.1 ,,
but give error .
HTML Code:

Deprecated: Assigning the return value of new by reference is deprecated in D:\xampp\htdocs\diskus\view.php on line 787

Deprecated: Assigning the return value of new by reference is deprecated in D:\xampp\htdocs\diskus\view.php on line 916

anyone can help ??

Its not about vb version, its about PHP version in your server.

Edit view.php, find lines 787 and 916 and put a @ symbol at the beginning of files. Error will be gone.

tommyxv 08-28-2013 08:00 PM

Quote:

Originally Posted by EricGT (Post 2424955)
After I posted the above comments, I looked through this thread and found the navigation tab issue brought up over and over, with no satisfactory answer. I think it is pretty important to be able to have more than one WebTemplate-generated page linked to in the navigation bar and still have the 'Selected' function of the nav tabs work. I'm not sure why something this fundamental wasn't addressed long ago.

The answer was a simple one. I put a conditional statement above the line where the 'THIS_SCRIPT' constant was defined. It takes the pg= value and assigns it as the THIS_SCRIPT constant.

Drawing from something Logician did, I took it a step further and looked for an underscore in the pg= value. If one was found, the text to the left of the underscore and the underscore itself becomes the THIS_SCRIPT value. This way, if there are a large number of submenu items for a WebTemplates-generated page, all of the sub-pages can highlight the correct navigation tab if the same prefix is used in their template names, without having to list each of their THIS_SCRIPT values in the navigation tabs admin area. That variable only allows 30 characters of data, so that capacity could quickly become exhausted.

In the canned templates installed with this mod, every template that used the Site Information Pages Template theme has a template name that starts with 'info_'. With this naming schema, every Webtemplates-generated page that used that prefix would highlight the same navigation tab using my mod to this mod, if the value 'info_' was added as the Tab Script(s) value for that tab.

Anyway, I am a little embarrassed to share the code I used. I am a PERL programmer that is new to PHP and I couldn't get the Regex conditionals to function for me cleanly in PHP, so the code is a little sloppy. It works great though. In the view.php file, replace the
PHP Code:

// #################### DEFINE IMPORTANT CONSTANTS #######################
define('THIS_SCRIPT''view'); 

with the code below.

PHP Code:

// #################### DEFINE IMPORTANT CONSTANTS #######################

if (preg_match('/view\.php/i'$_SERVER['REQUEST_URI'])) {
   
$SelectResult preg_split'/=/'$_SERVER['REQUEST_URI'] );
   
$SelectVariable $SelectResult[1];
   if (
preg_match('/_/i'$SelectVariable)) {
      
$SelectResult2 preg_split'/_/'$SelectVariable );
      
$SelectVariable $SelectResult2[0] . '_';
   }
} else {
      
$SelectVariable 'view';
}        
define('THIS_SCRIPT'$SelectVariable); 

The THIS_SCRIPT value will then be whatever you named a given template, unless your template name has an underscore '_' in it. Then, it will be all of the name left of the underscore and the underscore itself. I left the underscore in there to prevent any accidental matches with other names. 'Info', for instance, might get used in a variable name that did not start with 'info_'.

I hope this info helps. If you find this helpful and can clean up my See-Spot-Run Regex's in my code, I'd appreciate it if you could post the cleaned up code here, so I can see what I was doing wrong. I had to use the two preg_split commands because I couldn't pull the relevant data out of the string in the conditional matches. This is really easy in PERL. I suspect it is in PHP as well. I just got tired of trying to make it work. Thanks and thanks again to Logician, for a wonderful mod.

This works great. For the life of me I cannot figure out what this was never implemented in the mod. Who wouldn't want the correct tab highlighted for the page?

Thanks

bulbasnore 09-15-2013 08:34 PM

I must be missing some syntax change in the versions. Can't find it in the vb manual? Can anyone spot it?

In PHP Include:
Code:

$cleantestvar =& $vbulletin->input->clean_gpc('g', 'imageid', TYPE_INT);
In template:
Code:

<center><img src="http://pokegym.net/gallery/displayimage.php?imageid=$cleantestvar"></center>
Welcome to the PokeGym Researching Tower, $bbuserinfo[username]!
<if condition="is_member_of($bbuserinfo, 33)"><a href="http://pokegym.net/gallery/editimage.php?i=$cleantestvar" target=_blank>Edit</a> this image or metadata</if>

This used to work until the version change (and upgrade to new web templates, hooray!)

So passing this gives a blank page!
Code:

http://server/forums/view.php?pg=towercard&imageid=52494
with nothing in Apache error_log.

but executing the template with $cleantestvar substituted with the value 52494 gives the desired result, so I'm guessing $cleantestvar is coming up null/blank.

Suggestions?

Logician 09-16-2013 06:32 AM

Quote:

Originally Posted by bulbasnore (Post 2445863)
I must be missing some syntax change in the versions. Can't find it in the vb manual? Can anyone spot it?

In PHP Include:
Code:

$cleantestvar =& $vbulletin->input->clean_gpc('g', 'imageid', TYPE_INT);
In template:
Code:

<center><img src="http://pokegym.net/gallery/displayimage.php?imageid=$cleantestvar"></center>
Welcome to the PokeGym Researching Tower, $bbuserinfo[username]!
<if condition="is_member_of($bbuserinfo, 33)"><a href="http://pokegym.net/gallery/editimage.php?i=$cleantestvar" target=_blank>Edit</a> this image or metadata</if>

This used to work until the version change (and upgrade to new web templates, hooray!)

So passing this gives a blank page!
Code:

http://server/forums/view.php?pg=towercard&imageid=52494
with nothing in Apache error_log.

but executing the template with $cleantestvar substituted with the value 52494 gives the desired result, so I'm guessing $cleantestvar is coming up null/blank.

Suggestions?

VB4.x has changed the structure of variable support in templates so I removed outside variable support from the hack as it is now too complicated to use for non-coder users.

In vb4.x you can't simply use a variable inside a template without registering it in the PHP code. So outside variables can still be used in webqueries etc. but to display them inside templates, they should be declared like "$templater->register('cleantestvar', $cleantestvar);" in view.php.

Or to avoid this, maybe you can trick vb by assigning your variable to an already recognized vb variable in phpinclude like:
$vbulletin->input->clean_array_gpc('r', array(
'cleantestvar' => TYPE_STR,
));

$vbulletin->options[cleantestvar] = $vbulletin->GPC['cleantestvar'];

As $vbulletin->options is a declared variable, vb will allow this in templates.

As for the error, you can trace it via PHP error log, not apache error log. You can enable it in WHM if already not enabled, or simply turn on screen display to see them posted directly to screen during running of the scripts.

redrock 10-05-2013 01:51 AM

Question, I have this installed just fine. I have the ProGamer Theme installed and each of the pre-installed templates don't bring across the background image of the theme. Please help!!

hugh_ 10-09-2013 07:11 PM

I'm seeing the following errors since I upgraded to vbulletin 4.2.2 and php 5.4...

Warning: Assigning the return value of new by reference is deprecated in ..../includes/wt_class_core.php on line 305
Warning: Assigning the return value of new by reference is deprecated in ..../view.php on line 81

ozzy47 10-09-2013 10:01 PM

Warning: Assigning the return value of new by reference is deprecated in ....Bla Bla Bla

How to fix.

Open the file, view.php, in that file find the following (twice in the file):

Code:

$parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
Replace with:
Code:

$parser = new vB_BbCodeParser($vbulletin, fetch_tag_list());
Open the file, includes/wt_class_core, in that file find the following:

Code:

$bgclass =& $GLOBALS['bgclass'];
Replace it with this:

Code:

$bgclass = $GLOBALS['bgclass'];
Find:
Code:

$parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
Replace with:
Code:

$parser = new vB_BbCodeParser($vbulletin, fetch_tag_list());
Find:
Code:

$parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
Replace with:
Code:

$parser = new vB_BbCodeParser($vbulletin, fetch_tag_list());

hugh_ 10-10-2013 11:20 AM

That worked. Thank you very much!

ozzy47 10-10-2013 11:44 AM

Not a problem, glad to help. :)

redrock 10-13-2013 02:58 AM

1 Attachment(s)
Fresh install on 4.2.2 Please help.

ozzy47 10-13-2013 03:00 AM

That screenshot don't help, you need to get the error message from your error logs, or from your email.

redrock 10-13-2013 03:03 AM

Where is the logs at?

ozzy47 10-13-2013 03:05 AM

If you are not sure where the are at, ask your host, they should be able to tell you where they are located on your setup.

redrock 10-13-2013 03:09 AM

I am the host lol. I rent a vps server. PM sent.

ozzy47 10-13-2013 03:12 AM

Then if you own the server, you should be able to find the logs, If you lease it from a service, contact them.

redrock 10-13-2013 03:15 AM

Its weird cause I installed the Advanced Application forms mod too and I get the same thing when I click on any of the links too

redrock 10-13-2013 03:20 AM

I think its not letting me modify the admin folder. hmmmm

ozzy47 10-13-2013 03:20 AM

Then I would suggest to do the following.

Open your config.php and below<?php add this line:

PHP Code:

 define('DISABLE_HOOKS'true); 

So it looks like this:
PHP Code:

<?php
define
('DISABLE_HOOKS'true);
/*=================================================  =====================*\
|| ##################################################  ################## ||
|| # vBulletin 4.2.1

Go to your ACP, disable this mod, In Plugins & Products, then remove the define('DISABLE_HOOKS', true); from the config.php

Then you can uninstall the mod since it seems to blow your site up.

Logician 10-13-2013 05:40 AM

Quote:

Originally Posted by redrock (Post 2452799)
Fresh install on 4.2.2 Please help.

Give more info please. At what URL do you get that error? When did it start to happen?

If you get it in regular vb pages, I doubt its about webtemplates. Webtemplates does not have any hooks in vb system which can effect other vb pages. A problem in the hack will only effect its own page.

BTW internal server error in all pages can mean you messed up .htacess file. If you changed it recently, change it back. (or at least temporarily remove it to get rid of the problem)

redrock 10-13-2013 07:05 AM

Long story short....I'm a dumbass. :) I was using FireFtp to upload files. My provider suggested to use filezilla to upload files and that did the trick. Something was happening when I uploaded using the firefox add-on. All is up and working now. Thanks!!

ozzy47 10-13-2013 09:31 AM

Ahh cool, thanks for reporting back, I would have never though of that as I have always used FileZilla.

dawges 10-13-2013 09:29 PM

Finally added this. Thank you, now i can remove like 3 mods that this one alone replaced.

Pocket Aces 11-04-2013 02:30 PM

How to use this mod in custom style? Header is all messed up.

wildheart 02-14-2014 09:31 AM

Great mod thank you so much!

Is there a way to make these templates accessible via tapatalk?

Logician 02-14-2014 10:25 AM

Quote:

Originally Posted by wildheart (Post 2481057)
Great mod thank you so much!

Is there a way to make these templates accessible via tapatalk?

I don't know a way to do that but this is really about tapatalk, not webtemplates. Tapatalk app can pull information from webtemplates if they design it like that so asking this in their forum might have a better chance of getting it done. :)

midnz 02-25-2014 07:00 AM

Hi Logician, I was wondering if you can solve my puzzle:

I'm using your default web query $WQ_last10threadfromforum2 but changed it to extract threads from forum#121 and it works as it should.
PHP Code:

SELECT threadidtitlepostusername,postuserid,dateline 
FROM 
" . TABLE_PREFIX . "thread 
WHERE sticky
=AND visible=AND forumid=121
ORDER BY dateline DESC
LIMIT 10 

I duplicated that web query ($WQ_last10threadfromforum3) and tried to extract the threads from forumid=230 but it didn't work. The resulting display was blank.
PHP Code:

SELECT threadidtitlepostusername,postuserid,dateline 
FROM 
" . TABLE_PREFIX . "thread 
WHERE sticky
=AND visible=AND forumid=230
ORDER BY dateline DESC
LIMIT 1 

... and so I executed an SQL Query and noticed the following error:
Quote:

An error occurred while attempting to execute your query. The following information was returned.
error number: 1064
error desc: 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 '" . TABLE_PREFIX . "thread
WHERE sticky=0 AND visible=1 AND forumid=230
ORDER' at line 2
So, I did the same with the code that works as it should:
Quote:

An error occurred while attempting to execute your query. The following information was returned.
error number: 1064
error desc: 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 '" . TABLE_PREFIX . "thread
WHERE sticky=0 AND visible=1 AND forumid=121
ORDER' at line 2
But that one does in fact display the last ten threads from forum#121.
I did try to read the 5.1.72 manual until my eyes crossed and fell out on to my cheeks.
Can you help please?

Logician's WebTemplates 4.0.2
MySQL Version - 5.1.72-cll
vB 4.2.2

Logician 02-25-2014 08:22 AM

Quote:

Originally Posted by midnz (Post 2483589)
Hi Logician, I was wondering if you can solve my puzzle:

I'm using your default web query $WQ_last10threadfromforum2 but changed it to extract threads from forum#121 and it works as it should.
PHP Code:

SELECT threadidtitlepostusername,postuserid,dateline 
FROM 
" . TABLE_PREFIX . "thread 
WHERE sticky
=AND visible=AND forumid=121
ORDER BY dateline DESC
LIMIT 10 

I duplicated that web query ($WQ_last10threadfromforum3) and tried to extract the threads from forumid=230 but it didn't work. The resulting display was blank.
PHP Code:

SELECT threadidtitlepostusername,postuserid,dateline 
FROM 
" . TABLE_PREFIX . "thread 
WHERE sticky
=AND visible=AND forumid=230
ORDER BY dateline DESC
LIMIT 1 

... and so I executed an SQL Query and noticed the following error:
So, I did the same with the code that works as it should:
But that one does in fact display the last ten threads from forum#121.
I did try to read the 5.1.72 manual until my eyes crossed and fell out on to my cheeks.
Can you help please?

Logician's WebTemplates 4.0.2
MySQL Version - 5.1.72-cll
vB 4.2.2

You can't directly run these SQL queries in applications like phpmyadmin because it has a vbulletin replacement in it. (which is " . TABLE_PREFIX . " ).

So its NORMAL that BOTH of these queries will produce a syntax error when you try to run them "as they are" in tools like phpmyadmin. If you want to run them there, you need to remove " . TABLE_PREFIX . " part and use this query:


PHP Code:

SELECT threadidtitlepostusername,postuserid,dateline 
FROM thread 
WHERE sticky
=AND visible=AND forumid=230
ORDER BY dateline DESC
LIMIT 10 

or
PHP Code:

SELECT threadidtitlepostusername,postuserid,dateline 
 FROM thread 
 WHERE sticky
=AND visible=AND forumid=121
 ORDER BY dateline DESC
 LIMIT 10 

These should run fine in phpmyadmin.

However this still does not explain why your query is not running in webtemplates. :) I suspect there is another problem somewhere else rather than the query syntax. I don't know if your webmaster email in config.php file is accurate but if webquery died with a DB error (like syntax error) you would get a DB error notification in your email. Since you didn't get it, I'd think that there is no problem with your webquery.

Blank pages usually means PHP errors and they happen in servers where PHP error display is turned off in php.ini. If it was on, the page would display the error and we would have more clue. Since its off, I don't know what is causing the error but maybe you can check it in your server's php error log. I'd suspect something about the webtemplate your recently created (rather than webquery).

So my first suggestion is, create a new test webtemplate with nothing in it but a simple "hello there $WQ_last10threadfromforum3" and see if it will also produce a blank page. If it works, then you can understand its somehow related to the content of your other webtemplate (not webquery!). It might be clashing with an other plugin or smt.

It would really help if you enable php error display in server so that we'll see the error message that blank page is suppose to produce.

midnz 02-26-2014 04:29 AM

Quote:

Originally Posted by Logician (Post 2483600)
However this still does not explain why your query is not running in webtemplates. :) I suspect there is another problem somewhere else rather than the query syntax.

You were 100% correct. The problem was within my brain. I hadn't ticked that webquery to run in the page that I wanted it to run in.

http://imageshack.com/a/img32/1315/zw9u.jpg

Thanks for your effort. My apologies for wasting your time.

Hasanudin 03-01-2014 06:24 AM

vB 4.2.2

bellow 'Site Help Pages' :

Quote:

Error: Header Template is Customised

tbworld 03-01-2014 10:17 AM

I do not use this mod, but I believe the error message is saying that it cannot auto insert changes to the header template, due to it being already modified.

You should always test a new modification on a default vbulletin setup (no customizations) -- a test board. Make sure you read the thread on this mod since there are some change you will have to make to run it on v4.2.2.

JenniferK 03-02-2014 02:29 AM

1 Attachment(s)
I am using the Header 2 location in ad management. I am running 4.2.2, using the default style. Based on advice I was given to correct a display issue (header 2 ad was just right of the header image instead of all the way to the right), this has been corrected on all forum pages, but it is still displaying incorrectly on the pages using webtemplates (see attachment). The attachement image is not a webtemplate page, but that is how it is still displaying there. To fix it on the forum pages, I entered this into additional.css:

HTML Code:

.ad_global_header {
        float:{vb:stylevar right};
        margin-right:0px !important;
}
#ad_global_header1 {
        float:{vb:stylevar left};
        padding:0px !important;
        margin:0px !important;
}
#ad_global_header2 {
        float:{vb:stylevar right};
        padding:0px !important;
        margin-top:50px !important;
}

What can I do to fix it on the pages that use webtemplates?

Logician 03-02-2014 11:32 AM

Quote:

Originally Posted by JenniferK (Post 2484528)
I am using the Header 2 location in ad management. I am running 4.2.2, using the default style. Based on advice I was given to correct a display issue (header 2 ad was just right of the header image instead of all the way to the right), this has been corrected on all forum pages, but it is still displaying incorrectly on the pages using webtemplates (see attachment). The attachement image is not a webtemplate page, but that is how it is still displaying there. To fix it on the forum pages, I entered this into additional.css:

HTML Code:

.ad_global_header {
    float:{vb:stylevar right};
    margin-right:0px !important;
}
#ad_global_header1 {
    float:{vb:stylevar left};
    padding:0px !important;
    margin:0px !important;
}
#ad_global_header2 {
    float:{vb:stylevar right};
    padding:0px !important;
    margin-top:50px !important;
}

What can I do to fix it on the pages that use webtemplates?

Depends on the webtemplate. If its using a theme like "Default Basic Theme", then you can edit that theme's webtemplate "default_basic_theme1" and insert it after "{vb:raw headinclude}" part.

JenniferK 03-02-2014 05:42 PM

Yes, they are all Default Basic Theme that I am concerned with. I am not great at all of this, can you give me some more direction? I know what template to edit now, but what am I inserting exactly? Does it go immediately after "{vb:raw headinclude}"?

Sorry to be dense, my know-how with all of this is minimal.

Logician 03-02-2014 07:45 PM

Quote:

Originally Posted by JenniferK (Post 2484592)
Yes, they are all Default Basic Theme that I am concerned with. I am not great at all of this, can you give me some more direction? I know what template to edit now, but what am I inserting exactly? Does it go immediately after "{vb:raw headinclude}"?

Sorry to be dense, my know-how with all of this is minimal.

Yes according to what you described it seems that you need to edit webtemplate theme named "Default Basic Theme" and after the section {vb:raw headinclude} copy paste your code.

JenniferK 03-02-2014 10:41 PM

You mean the same code (as above) that I put into addition.css? If so, I did try that and the image was still in the same place but the code was listed out at the top of the page. If it is something else I am supposed to put after, then I'm not sure it that code would be.

Logician 03-03-2014 07:31 AM

Quote:

Originally Posted by JenniferK (Post 2484655)
You mean the same code (as above) that I put into addition.css? If so, I did try that and the image was still in the same place but the code was listed out at the top of the page. If it is something else I am supposed to put after, then I'm not sure it that code would be.

PM me admin cp access to your forum and also url to the problematic webtemplate and let me check.

Bluefin221 03-03-2014 02:53 PM

I installed this, worked absolutely perfectly on the default VB theme however when I try to use my theme which I set as default TF_Ideal the background is missing and the template a bit messy.

The footer is also having some serious alignment problems, I searched through the threads and only one other user mentioned this but he/she received no answer, here is an image of whats happening.

https://vborg.vbsupport.ru/

Logician 03-03-2014 03:22 PM

Quote:

Originally Posted by Bluefin221 (Post 2484753)
I installed this, worked absolutely perfectly on the default VB theme however when I try to use my theme which I set as default TF_Ideal the background is missing and the template a bit messy.

The footer is also having some serious alignment problems, I searched through the threads and only one other user mentioned this but he/she received no answer, here is an image of whats happening.

http://www.prestigeclubgaming.com/fo...themeissue.png

Unfortunately my assistence with custom styles can be pretty limited (close to none) because:
1- I'm a coder and I have very limited designing skills.
2- There are way too many custom skins users have.

So I wish I could help but I can't. Hopefully you get help from another hack user or the designer of that custom skin.

Bluefin221 03-03-2014 03:23 PM

Quote:

Originally Posted by Logician (Post 2484758)
Unfortunately my assistence with custom styles can be pretty limited (close to none) because:
1- I'm a coder and I have very limited designing skills.
2- There are way too many custom skins users have.

So I wish I could help but I can't. Hopefully you get help from another hack user or the designer of that custom skin.

Thank you for at least responding, hopefully someone can help.

JenniferK 03-03-2014 03:30 PM

I have to throw in my thanks for prompt assistance to fix the issue I was having!


All times are GMT. The time now is 01:10 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.01697 seconds
  • Memory Usage 1,901KB
  • 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
  • (14)bbcode_code_printable
  • (3)bbcode_html_printable
  • (10)bbcode_php_printable
  • (15)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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