vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Template Issues (https://vborg.vbsupport.ru/showthread.php?t=221571)

Irwin 08-23-2009 03:38 PM

Template Issues
 
(first post on forums, so please forgive any mistakes)

I've been [pitifully] attempting to modify my forum template a bit here & there and I've encountered a few issues where my [pseudo] HTML knowledge simply does not suffice.

___


My first problem is that I wanted to replace the user offline/online/invisible text/image in the post-bit with an underline for the user-name (green if online, white if offline) & after searching through the forums a bit, I thought I had it but it does not work:
Code:

  <if condition="$show['profile']">
    <if condition="$onlinestatus==1">
      <a class="bigusername" style="border-bottom: 1px dotted #00FF00" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]</a>
    <else />
      <a class="bigusername" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]</a>
    </if>
    <script type="text/javascript"> vbmenu_register("postmenu_$post[postid]", true); </script>
  <else />
    $post[musername]
  </if>

Does anyone know why I'm having this problem?

___


My second problem revolves around prefix styling, I was attempting to brace all prefixes in '['/']' but I've seemingly hit a snag. When prefixes are shown in the thread-bit, they're shown as such:
Code:

  $thread[prefix_rich]
I attempted to encapsulate the prefix in brackets but the problem is that when there is no prefix you're left with an empty "[]" brace before the thread name is shown. I've tried to find the "prefix_rich" definition but have been unable to thus-far and I'm assuming the pseudo-HTML <if> tag does not support comparing "prefix_rich" to an empty string (furthermore, I do not know the string delimiters in HTML).

___


Thanks in advance.

theFM 08-24-2009 02:10 PM

the first issue you do not have this $post[onlinestatus] , put that where you want the online status to be on

for the second issue really i do not see any problem
Hope it solved for you

Regards.

Lynne 08-24-2009 02:38 PM

If you want your prefixes to have [] around them, why not add it in the Prefix Manager for the prefix? I suppose the other way would be:
HTML Code:

<if condition="$thread[prefix_rich]">[$thread[prefix_rich]]</if>
(not tested!)

Irwin 08-24-2009 09:11 PM

Quote:

Originally Posted by theFM (Post 1873395)
the first issue you do not have this $post[onlinestatus] , put that where you want the online status to be on

for the second issue really i do not see any problem
Hope it solved for you

Regards.

Please read my post before you reply in the future. I do not wish to show $post[onlinestatus] (which is typically an image or text which shows online status), I only want to underline the poster's user-name with a certain color to show their current status. To simplify this, I'll put it like this:
Code:

if user...
  online:    user-name color = GREEN
  offline:  user-name color = RED
  invisible: user-name color = WHITE

Quote:

Originally Posted by Lynne (Post 1873416)
If you want your prefixes to have [] around them, why not add it in the Prefix Manager for the prefix? I suppose the other way would be:
HTML Code:

<if condition="$thread[prefix_rich]">[$thread[prefix_rich]]</if>
(not tested!)

Thanks, your solution worked :)
I can't do this through the prefix manager because vBulletin (or maybe it's just my skin) seems already encapsulate prefixes in braces when on the forum index.

Also, where the prefix text was set in the bread-crumb in the nav-bar & the page title?

Lynne 08-24-2009 09:18 PM

No, vbulletin does not put them in braces on the forum index. It must be your skin. Did you try the condition I posted?

James Birkett 08-24-2009 09:27 PM

Your issue on your first problem (I think) is that you are posting their mark-up username (what is set per usergroup) - without the underline.

I will see what I can come up with, and reply.

EDIT:
It seems whatever methods I try - it over-rides current username mark-up.

Irwin 08-24-2009 09:44 PM

Quote:

Originally Posted by Lynne (Post 1873705)
No, vbulletin does not put them in braces on the forum index. It must be your skin. Did you try the condition I posted?

"Thanks, your solution worked :)"

Quote:

Originally Posted by James Birkett (Post 1873711)
Your issue on your first problem (I think) is that you are posting their mark-up username (what is set per usergroup) - without the underline.

I will see what I can come up with, and reply.

EDIT:
It seems whatever methods I try - it over-rides current username mark-up.

Take a look at the "$onlinestatus==1" clause:
HTML Code:

    <if condition="$onlinestatus==1">
      <a class="bigusername" style="border-bottom: 1px dotted #00FF00" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]</a>
    <else />
      <a class="bigusername" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]</a>
    </if>



All times are GMT. The time now is 09:09 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.01357 seconds
  • Memory Usage 1,737KB
  • 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
  • (3)bbcode_html_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete