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 01-11-2010 07:56 PM

Quote:

Originally Posted by Shanj (Post 1952886)
Perhaps if you tell me the limitations on "minor modifications" I could understand what is possible, and do my design to fit the limitations.

I don't know how to do conditionals. But if you tell me where to look I will learn it.

When you use seperate webtemplates as you do now, you have priviledge to set different options for each webtemplates as you enter them in "edit webtemplate" page.

For instance webtemplate A can use theme A, webtemplate B can be BBcode parsed, webtemplate C can be banned to user C etc.

However when you use single webtemplate for all usergroups obviously you are bound with the settings you entered in that webtemplate so you can't set them seperately for each usergroup.

But if this is not your concern and you are just interested in displaying a different content in that very webtemplate to different usergroups, it is possible via "conditionals". You can see the usage of one conditional in builtin webtemplate named "test". It appears with "hidden text" remark when you login as admin.

Webtemplates inherit the default vb template conditionals syntax so you can use if else conditions just like you use them in your styles:
PHP Code:

<if condition="$bbuserinfo[usergroupid] == 6">
show this text to administrator
</if>
<if 
condition="$bbuserinfo[usergroupid] == 2">
show this text to registered member
</if> 

etc.

And more info can be found in vb's manual about conditionals.

Shanj 01-12-2010 03:21 PM

Thank you for the lovely clear explanation. I have read your documentation again. Then I copied the php from the test page, switched it to html, and it WORKS! HURRAY! I have conditional view pages!

But my first page is using the usergroup tickbox options in admin rather than a conditional php in the webtemplate. It looks to me like that is safer as this is a shared edit page with my mods who might accidentally mess the php conditional at top or bottom.
Does that sound right?

WEB EDITOR .....................................
There was a small problem with the webeditor.
The link already on the page generates a double URL!

http://www.mysite.com/xyz/www.mysite...=edit&pg=testa

I placed a bbcode [URL] link at the top to the editor and it's fine.
I just wondered if you can think of why the code supplied is doing this?
It's OK in View Source, just one URL.

I do have a slightly nonstandard filepath for my vbulletin - it's in directory xyz as you see in the URL. Perhaps this is difficult for your editor script command?

This is great. I'll work on the conditional page to replace forumhome later.

Thank you for everything. This is a very exciting mod. It does powerful things AND the instructions you give are extremely good.
A lot of coders do powerful things but their instructions are not clear. That makes their work useless. I understand why - instructions are my profession and it's a different brain training to code. So someone like you who does both code and instructions well, is rare - an unusual treasure.

Logician 01-12-2010 03:45 PM

Quote:

Originally Posted by Shanj (Post 1953619)
WEB EDITOR .....................................
There was a small problem with the webeditor.
The link already on the page generates a double URL!

http://www.mysite.com/xyz/www.mysite...=edit&pg=testa

I placed a bbcode [url] link at the top to the editor and it's fine.
I just wondered if you can think of why the code supplied is doing this?
It's OK in View Source, just one URL.

You just entered "$WT_Editor_link" in the webtemplate right? This variable is suppose to give you the correct editor link for this page. If you appended it like "http://www.mysite.com/$WT_Editor_link" please dont do it. Just use "$WT_Editor_link" as is. I hope this will fix your problem.

And thanks for kind words! :)

Shanj 01-12-2010 05:16 PM

"$WT_Editor_link"

No I used http://<a href="http://www.mysite.co...g=testt <br />

This link works fine.


It was the little font link that appeared automatically via your script that gave the funny double result.
It's not your code obviously as the View Source link shows it properly.
Probably something on my site.
Unless you can think of something it might be I'll just go on putting the link in manually.

You deserve nice words. I meant it you're very very good.

Wilfred1 01-14-2010 04:45 AM

I have set up my chat room on a web templates page and is working well. The only thing I would like to do now is to include a list of usernames that are on the chat room page (i.e. chatting in the chat room) in the "What's Going On" box at the bottom of the forums home page.

Is there any way that I can adapt the WebTemplates_NowBrowsing template that has the variable $activeusers to specify a page or is there any other way to achieve this with this great mod?

Thanks for any advice.

Logician 01-14-2010 06:28 AM

Quote:

Originally Posted by Wilfred1 (Post 1955157)
I have set up my chat room on a web templates page and is working well. The only thing I would like to do now is to include a list of usernames that are on the chat room page (i.e. chatting in the chat room) in the "What's Going On" box at the bottom of the forums home page.

Is there any way that I can adapt the WebTemplates_NowBrowsing template that has the variable $activeusers to specify a page or is there any other way to achieve this with this great mod?

Thanks for any advice.

Well, unfortunately there is no very easy way to do this but if you are familiar with sql queries, you can create a new webtemplate which displays only a single webquery result in it and then in this webquery you can adopt this:

PHP Code:

                                            SELECT user.usernameuser.usergroupiduser.membergroupids,
                                            
session.useridsession.inthreadsession.lastactivity,
                                            IF(
user.displaygroupid 0user.usergroupiduser.displaygroupid) AS displaygroupid,
                                            IF(
user.options " . $vbulletin->bf_misc_useroptions['invisible'] . "10) AS invisible
                                            FROM 
" . TABLE_PREFIX . "session AS session
                                            LEFT JOIN 
" . TABLE_PREFIX . "user AS user ON(user.userid session.userid)
                                            
WHERE 
                                            session
.lastactivity $datecut AND  (session.location LIKE '%".$Search_Word_for_session_TB."?%' AND session.location LIKE '".$idSQL."') OR  (session.location LIKE '%".$Search_Word_for_session_TBURL."%')
                                            
ORDER BY session.lastactivity DESC 

which is the default query to return a specific webtemplate's visitors.

Then you can put this webtemplate in a iframe to display in any place you like.

I'm sorry it is not very easy and I couldn't find time to do it for you but I at least tried to show you the correct route.

Shanj 01-14-2010 12:20 PM

Logician dear man

Plese advise about images in the templates.
Obviously I can hard code with a full site link
http://www.mysite.com/pics/imagefile.jpg

But isn't it better for loading to use relative links?
If I knew where the webtemplate pages are saved I could create a subdirectory in that directory for my pics. Then my image links could be
../pics/imagefile.jpg
which is quicker neater coding.

If you tell me I'm making an unnecessary fuss and just using a full site URL
http://www.mysite.com/pics/imagefile.jpg
then I will do that.

Logician 01-14-2010 01:12 PM

Quote:

Originally Posted by Shanj (Post 1955413)
Logician dear man

Plese advise about images in the templates.
Obviously I can hard code with a full site link
http://www.mysite.com/pics/imagefile.jpg

But isn't it better for loading to use relative links?
If I knew where the webtemplate pages are saved I could create a subdirectory in that directory for my pics. Then my image links could be
../pics/imagefile.jpg
which is quicker neater coding.

If you tell me I'm making an unnecessary fuss and just using a full site URL
http://www.mysite.com/pics/imagefile.jpg
then I will do that.

You can use all vb style variables that are used in regular vb templates.

Eg.
$stylevar[imgdir_misc]

Drago13 01-14-2010 02:01 PM

Any idea when this will be ported to 4.0.. This was one of my favorite mods, and I MISS it !!
I have been checking back here a couple times a day , hoping to see some good news.. Anxiously awaiting... ;)

Shanj 01-14-2010 11:30 PM

Dear Logician

I have a long complex page but just for me to edit. It has to be html - lots of tables and some php conditionals.

One area is not complicated, just plain text, font size, colour, line breaks.
There is one picture at the top.
The text is all in one table cell
<td>Text content</td>

I want to frequently update this by changing the text content.

Your interface in the admin cp and your wyswyg html editor online are both very good indeed so obviously I can already do that.
I REALLY love the online web editor.

But it would be wonderful if I could set tags around this quick-edit text section which the online editor recognises.
Then I can open ONLY that section of simple text in one table cell, to edit.

Plus if possible, replace the picture by changing the URL.

Possible?

Your respectful admirer UK.


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