vb.org Archive

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

Logician 09-14-2011 05:27 PM

Quote:

Originally Posted by Spinball (Post 2245798)
Can I do this?
HTML Code:

<tr>
 <td class="$alternate" align="left" VALIGN="TOP"><div class="smallfont">$queryqueryresult) <a href='http://www.avforums.com/forums/member.php?$session[sessionurl]u=$WQfield[userid]'>$WQfield[username]</a></div></td>
 <td class="$alternate" VALIGN="TOP"><div class="smallfont">$WQfield[email]</div></td>
<td class="$alternate" VALIGN="TOP"><div class="smallfont">$WQfield[title]</div></td>
<td class="$alternate" VALIGN="TOP"><div class="smallfont">$WQfield[joined]</div></td>
<td class="$alternate" VALIGN="TOP"><div class="xsmallfont">$WQfield[ipaddress]<br /><? echo(geoip_country_name_by_addr($gi, $WQfield[ipaddress])); ?></div></td>
</tr>

in the Query Result Row of a WebQuery? Note the php element
PHP Code:

<? echo(geoip_country_name_by_addr($gi, $WQfield[ipaddress])); ?>

It's not working. I was wondering whether it was at all possible.
Thanks

Sorry nope, webquery section does not support external function calls.

Spinball 09-14-2011 08:23 PM

Bummer. Ok, thanks. Still love Webtemplates :)

cowcowcow 09-25-2011 12:41 PM

Hi Logician,

I am really liking WebTemplates so far.


Anyway to allow comments? Like a simple system comment system like bannalives tournament mod where anyone can leave comments on the pages.


Anyway this is a really cool mod and wish you had premium products, would definitely pay for something like this with pro features, you seem like a talented developer and super helpful to noobs in your documentation, which is fantastic for people like me :)

Would gladly offer my site to be featured too in the OP if you like.

N8 03-10-2012 07:46 AM

I'm having an issue using jQuery in my webtemplates:

the templates are taking the "$"s and converting them to $ in the html output.

Any way to stop this from happening?

Logician 03-13-2012 04:07 PM

Quote:

Originally Posted by N8 (Post 2308209)
the templates are taking the "$"s and converting them to $ in the html output.

This is an intended feature to provide security

I don't recommend disabling it but if you should, replacing the line
$val = preg_replace( "/\\\$/" , "$" , $val );

as

//$val = preg_replace( "/\\\$/" , "$" , $val );

in wt_include.php should take care of it.

N8 03-16-2012 05:30 AM

^ Thanks.


I also have a question regarding WebQueries:


Inside of:

Query Result Row
Use $WQfield[fieldname] variables to replace returned fields in your HTML code


Is there a way to use conditional statements?



I have a webtemplate set up as basically a global "New thread" page - which grabs a list of forumid's / titles and outputs a list of every forum, with every forum name linking to it's respective newthread.php link.

What I want to do now is be able to show which forums are empty, but can't figure out how to use a conditional statement to do so...


I've tried
Code:

<if condition=" $WQfield[lastpostid] == 0">code here</if>
.. but noticed that it doesn't matter what I put inside of condition="" - whatever is inside still ends up being displayed.


Is this just not builtinto the functionality of WebTemplates or am I doing something wrong? thanks :)

Logician 03-16-2012 07:42 AM

Quote:

Originally Posted by N8 (Post 2309952)
^ Thanks.


I also have a question regarding WebQueries:


Inside of:

Query Result Row
Use $WQfield[fieldname] variables to replace returned fields in your HTML code


Is there a way to use conditional statements?



I have a webtemplate set up as basically a global "New thread" page - which grabs a list of forumid's / titles and outputs a list of every forum, with every forum name linking to it's respective newthread.php link.

What I want to do now is be able to show which forums are empty, but can't figure out how to use a conditional statement to do so...


I've tried
Code:

<if condition=" $WQfield[lastpostid] == 0">code here</if>
.. but noticed that it doesn't matter what I put inside of condition="" - whatever is inside still ends up being displayed.


Is this just not builtinto the functionality of WebTemplates or am I doing something wrong? thanks :)

Webqueries result row section does not support template condiditionals.

You can do what you want by hacking view.php. Find this line:
PHP Code:

@eval("\$birikenrow .= \"".WTgettemplate("$WTWQ[resultrow]"10)."\";"); 

and before that use something like this

PHP Code:

 if ($WTWQ['qname']=='$WQ_last10threadfromforum2'
{
$WQfield[title] = "If webquery name is $WQ_last10threadfromforum2' this is what all thread titles will be!!";


Important: There are 2 of these lines so you should add the hack before BOTH of them.

webmastershome 05-16-2012 05:05 PM

i have just download and it's works good on my forums

mindhunter77 06-26-2012 12:31 PM

I keep getting this on my forum, is there anyway to fix this or maybe disable the visitor log?

Code:

Database error in vBulletin 3.8.7:

Invalid SQL:
SELECT count(*) as num,floor((1340668799-dateline)/604800) as week FROM vbwwu002visitlog WHERE

(userid=1)AND(dateline>=1338249600) GROUP BY week ORDER BY week;

MySQL Error  : BIGINT UNSIGNED value is out of range in '(1340668799 -

`bbq`.`vbwwu002visitlog`.`dateline`)'
Error Number  : 1690
Request Date  : Tuesday, June 26th 2012 @ 03:26:56 PM
Error Date    : Tuesday, June 26th 2012 @ 03:26:57 PM
Script        : .com/forum/
Referrer      : admincp/index.php?do=head
IP Address    : 71.
Username      : c
Classname    : vB_Database
MySQL Version : 5.5.24-0ubuntu0.12.04.1


mindhunter77 06-26-2012 01:14 PM

disregard my last post, this was related to the server time being off apparently.


All times are GMT. The time now is 01:24 PM.

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.01604 seconds
  • Memory Usage 1,761KB
  • 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
  • (3)bbcode_code_printable
  • (1)bbcode_html_printable
  • (3)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
  • (2)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