PDA

View Full Version : vbphrase not working right.


SᴩiDᴇЯ
02-09-2015, 11:10 PM
Hi everyone, i was wondering if someone could just help me with this issue below please.

in my phrase manager under: currently_active_users i have added this line below:

DigiWeb Members <font color="lime">Online</font> i also tried this line: DigiWeb Members <span style="color: lime; font-weight: bold;">Online</span> but same result.

but as per picture it comes out showing: Online" />DigiWebs Members Online, so how do i remove or fix this part of the line: Online" />

https://vborg.vbsupport.ru/external/2015/02/15.jpg

You can see it live here (http://digiwebs.com)

I just need to remove it.

Thank you in advance.

ForceHSS
02-09-2015, 11:51 PM
You have spaces in your code but I dont think that coding will work there
Here it is without spaces
<span style="color:lime;font-weight:bold;">Online</span>

SᴩiDᴇЯ
02-10-2015, 02:21 AM
You have spaces in your code but I dont think that coding will work there
Here it is without spaces
<span style="color:lime;font-weight:bold;">Online</span>

Hi Force thank you for the quick reply.
I copied the full line like this:
<span style="color:lime;font-weight:bold;">Online</span>

But it still looks the same.

http://snag.gy/byFE1.jpg

Is there another way of fixing the issue?

HM666
02-10-2015, 03:54 AM
You have spaces in your code but I dont think that coding will work there
Here it is without spaces
<span style="color:lime;font-weight:bold;">Online</span>

Spaces make no difference in CSS code like that. :)

Hi Force thank you for the quick reply.
I copied the full line like this:
<span style="color:lime;font-weight:bold;">Online</span>

But it still looks the same.

http://snag.gy/byFE1.jpg

Is there another way of fixing the issue?

However, there is a fix. :) Try using BB Code instead. Sometimes for whatever reason in the Phrases you have to use BB Code instead of HTML. So your code would look like this:

DigiWeb Members [B ][ COLOR = Lime ] Online [ / COLOR ] [ / B ]

Copy that above WITHOUT the spaces. :)

SᴩiDᴇЯ
02-10-2015, 04:27 AM
Spaces make no difference in CSS code like that. :)



However, there is a fix. :) Try using BB Code instead. Sometimes for whatever reason in the Phrases you have to use BB Code instead of HTML. So your code would look like this:

DigiWeb Members [B ][ COLOR = Lime ] Online [ / COLOR ] [ / B ]

Copy that above WITHOUT the spaces. :)

Hi HM i have copy the code like this:
DigiWebsOnline
and still same issue

https://vborg.vbsupport.ru/external/2015/02/14.jpg

Replicant
02-10-2015, 05:12 AM
How about this "modern" method?

<span class="online">Online</span>

and in additional.css

.online{
color:lime;
font-weight:bold;
}

HM666
02-10-2015, 06:28 AM
@Replicant that does not work either.

I'm trying these on my site and none of them work. OK fine let's try this then. Probably the only way to change this is to edit the template code instead.

Open your FORUMHOME template and find:

<h3 class="blocksubhead"><img src="{vb:stylevar imgdir_misc}/users_online.png" alt="{vb:rawphrase currently_active_users}" />{vb:rawphrase currently_active_users}</h3>

Change it to...

<h3 class="blocksubhead"><img src="{vb:stylevar imgdir_misc}/users_online.png" alt="{vb:rawphrase currently_active_users}" />DigiWeb Members <font color="lime">Online</font></h3>

I like your idea I'll probably leave it on y site lol.

The reason most likely that it did not work is because the phrase is found inside a header tag a h3 tag. The h3 tag has CSS of its own so there was a conflict most likely that was causing it to give that error. But the code in the template works well and gets the job done. :)

SᴩiDᴇЯ
02-10-2015, 08:36 AM
How about this "modern" method?

<span class="online">Online</span>

and in additional.css

.online{
color:lime;
font-weight:bold;
}


Hi Replicant.

I followed your instruction and added it all like:

In Phrase section added this:
<span class="online">Online</span>


Aditional.css last line added this:
.online{
color:lime;
font-weight:bold;
}

and still didn't work properly look:

https://vborg.vbsupport.ru/external/2015/02/11.jpg

--------------- Added 1423565249 at 1423565249 ---------------

@Replicant that does not work either.

I'm trying these on my site and none of them work. OK fine let's try this then. Probably the only way to change this is to edit the template code instead.

Open your FORUMHOME template and find:

<h3 class="blocksubhead"><img src="{vb:stylevar imgdir_misc}/users_online.png" alt="{vb:rawphrase currently_active_users}" />{vb:rawphrase currently_active_users}</h3>

Change it to...

<h3 class="blocksubhead"><img src="{vb:stylevar imgdir_misc}/users_online.png" alt="{vb:rawphrase currently_active_users}" />DigiWeb Members <font color="lime">Online</font></h3>

I like your idea I'll probably leave it on y site lol.

The reason most likely that it did not work is because the phrase is found inside a header tag a h3 tag. The h3 tag has CSS of its own so there was a conflict most likely that was causing it to give that error. But the code in the template works well and gets the job done. :)

That also didn't work look:

https://vborg.vbsupport.ru/external/2015/02/12.jpg

I added your line to Forumhome replacing the old one, I then deleted replicants code from additional.css and then i removed code from phrase and it showed the default settings on the page like this:

https://vborg.vbsupport.ru/external/2015/02/13.jpg

kh99
02-10-2015, 10:21 AM
The reason you're having a problem is because if you look at where that phrase is used in the FORUMHOME template, it looks like this:
<h3 class="blocksubhead"><img src="{vb:stylevar imgdir_misc}/users_online.png" alt="{vb:rawphrase currently_active_users}" />{vb:rawphrase currently_active_users}</h3>


so you can see that it's used both as the text you see and as the 'alt' attribute, so you cannot include html in that phrase. What you would need to do is put your <span> tag in FORUMHOME instead of in the phrase.

HM666
02-10-2015, 01:41 PM
Sorry my bad try this...

<h3 class="blocksubhead"><img src="{vb:stylevar imgdir_misc}/users_online.png" alt="DigiWeb Members <font color="lime">Online</font>" />DigiWeb Members <font color="lime">Online</font></h3>

Make sure that your phrase is still put back to the default original before making the change and this should work. It works fine on my site. Link Here (http://webdesignfetish.com/forum.php) (Its an adult webmasters site just so you know before you click)

ForceHSS
02-10-2015, 09:10 PM
Hi Force thank you for the quick reply.
I copied the full line like this:
<span style="color:lime;font-weight:bold;">Online</span>

But it still looks the same.

http://snag.gy/byFE1.jpg

Is there another way of fixing the issue?
As I said in my other post the coding wont work in there that also means all coding types ( I have tested it and none work) as far as I know best to put it in the template

SᴩiDᴇЯ
02-11-2015, 05:18 AM
Sorry my bad try this...

<h3 class="blocksubhead"><img src="{vb:stylevar imgdir_misc}/users_online.png" alt="DigiWeb Members <font color="lime">Online</font>" />DigiWeb Members <font color="lime">Online</font></h3>

Make sure that your phrase is still put back to the default original before making the change and this should work. It works fine on my site. Link Here (http://webdesignfetish.com/forum.php) (Its an adult webmasters site just so you know before you click)

I put the phrase back to default, added your new code in FORUMHOME and still i get the same problem.

http://snag.gy/h0Gvt.jpg

HM666
02-11-2015, 05:55 AM
I put the phrase back to default, added your new code in FORUMHOME and still i get the same problem.

http://snag.gy/h0Gvt.jpg

Then there is something else conflicting with it and something else is going on. It works fine on my site. Copy and paste your FORUMHOME template code in the thread please let me take a look.

EDIT: Have you tried clearing the cache in the AdminCP? Also there maybe a conflict with one of the mods that you have installed for the Who's Online area.

SᴩiDᴇЯ
02-11-2015, 06:44 AM
I have only added the mod VSa- Visitors in last X hours. and i did a Clear System Cache.
Here is the FORUMHOME

{vb:stylevar htmldoctype}
<html xmlns="http://www.w3.org/1999/xhtml"<vb:if condition="$vboptions['enablefacebookconnect']"> xmlns:fb="http://www.facebook.com/2008/fbml"</vb:if> dir="{vb:stylevar textdirection}" lang="{vb:stylevar languagecode}" id="vbulletin_html">
<head>
{vb:raw headinclude}
<title>{vb:raw vboptions.bbtitle}</title>
<script type="text/javascript" src="clientscript/vbulletin_read_marker.js?v={vb:raw vboptions.simpleversion}"></script>

<vb:if condition="$vboptions['storecssasfile']">
{vb:cssfile forumhome-rollup.css}
<vb:else />
{vb:cssfile forumbits.css,forumhome.css,widgets.css,sidebar.cs s,options.css,tagcloud.css}
</vb:if>

<!--[if lt IE 8]>{vb:cssfile forumbits-ie.css,sidebar-ie.css,options-ie.css}<![endif]-->
<vb:if condition="$show['sidebar']">
<script type="text/javascript" src="{vb:stylevar yuipath}/animation/animation-min.js?v={vb:raw vboptions.simpleversion}"></script>
<script type="text/javascript">
var sidebar_align = '{vb:raw show.sidebarposition}';
var content_container_margin = parseInt('{vb:math {vb:stylevar forum_sidebar_width}+{vb:math {vb:stylevar padding}*2}}');
var sidebar_width = parseInt('{vb:stylevar forum_sidebar_width}');
</script>
<script type="text/javascript" src="{vb:raw vboptions.bburl}/clientscript/vbulletin-sidebar.js?v={vb:raw vboptions.simpleversion}"></script>
</vb:if>
{vb:raw headinclude_bottom}
</head>
<body>

{vb:raw header}

{vb:raw navbar}

<vb:if condition="$show['sidebar']">
<div id="content_container" class="{vb:raw $sidebar_class} <vb:if condition="$show['sidebarposition'] == 'left'">contentright</vb:if>">
<div id="content" <vb:if condition="$sidebar_class">class="{vb:raw $sidebar_class}"</vb:if>>
</vb:if>
<!-- main -->
{vb:raw template_hook.forumhome_above_forums}
<ol id="forums" class="floatcontainer">
{vb:raw forumbits}
</ol>
{vb:raw template_hook.forumhome_below_forums}
<!-- /main -->

{vb:raw forumhome_markread_script}

{vb:raw ad_location.board_after_forums}

<!-- what's going on box -->
<div id="wgo" class="collapse wgo_block block">
<h2 class="blockhead">{vb:rawphrase whats_going_on}</h2>
<div class="blockbody formcontrols floatcontainer">
{vb:raw template_hook.forumhome_wgo_pos1}
<vb:if condition="$show['loggedinusers']">
<!-- logged-in users -->
<div id="wgo_onlineusers" class="wgo_subblock section">
<h3 class="blocksubhead"><img src="{vb:stylevar imgdir_misc}/users_online.png" alt="DigiWeb Members <font color="lime">Online</font>" />DigiWeb Members <font color="lime">Online</font></h3>
<div>
<p>{vb:rawphrase there_are_x_y_online_link, {vb:raw totalonline}, {vb:raw session.sessionurl_q}} <span class="shade">{vb:rawphrase x_members_and_y_guests, {vb:raw numberregistered}, {vb:raw numberguest}}</span></p>
<p>{vb:rawphrase most_users_ever_online_was_x_y_at_z, {vb:raw recordusers}, {vb:raw recorddate}, {vb:raw recordtime}}</p>
<vb:if condition="$activeusers">
<ol class="commalist" id="wgo_onlineusers_list">
<vb:each from="activeusers" value="loggedin">
<li>{vb:stylevar dirmark}<a class="username" href="{vb:link member, {vb:raw loggedin}}">{vb:raw loggedin.musername}</a>{vb:raw loggedin.invisiblemark}{vb:raw loggedin.buddymark}{vb:raw loggedin.comma}</li>
</vb:each>
</ol>
</vb:if>
</div>
</div>
<!-- end logged-in users -->
</vb:if>
{vb:raw template_hook.forumhome_wgo_pos2}
<vb:if condition="$show['upcomingevents']">
<div id="wgo_events" class="wgo_subblock section">
<h3 class="blocksubhead"><img src="{vb:stylevar imgdir_misc}/users_online.png" alt="DigiWeb Members <font color="lime">Online</font>" />DigiWeb Members <font color="lime">Online</font></h3>
<ol>
{vb:raw upcomingevents}
</ol>
</div>
</vb:if>
{vb:raw template_hook.forumhome_wgo_pos3}
<vb:if condition="$show['birthdays']">
<!-- today's birthdays -->
<div id="wgo_birthdays" class="wgo_subblock section">
<h3 class="blocksubhead"><img src="{vb:stylevar imgdir_misc}/birthday.png" alt="{vb:rawphrase todays_birthdays}" />{vb:rawphrase todays_birthdays}</h3>
<ol class="commalist">
<vb:each from="birthdays" value="row">
<li><a href="{vb:link member, {vb:raw row}}">{vb:raw row.username}</a><vb:if condition="$row['age']"> ({vb:raw row.age})</vb:if>{vb:raw row.comma}</li>
</vb:each>
</ol>
</div>
<!-- end today's birthdays -->
</vb:if>
{vb:raw template_hook.forumhome_wgo_pos4}
<div id="wgo_stats" class="wgo_subblock section">
<h3 class="blocksubhead"><img src="{vb:stylevar imgdir_misc}/forum_stats.png" alt="{vb:rawphrase x_statistics, {vb:raw vboptions.bbtitle}}" />{vb:rawphrase x_statistics, {vb:raw vboptions.bbtitle}}</h3>
<div>
<dl>
<dt>{vb:rawphrase threads}</dt>
<dd>{vb:raw totalthreads}</dd>
<dt>{vb:rawphrase posts}</dt>
<dd>{vb:raw totalposts}</dd>
<dt>{vb:rawphrase members}</dt>
<dd>{vb:raw numbermembers}</dd>
<vb:if condition="$show['activemembers']">
<dt>{vb:rawphrase active_members}</dt>
<dd>{vb:raw activemembers}</dd>
</vb:if>
</dl>
<p>{vb:rawphrase welcome_to_our_newest_member_x, {vb:link member, {vb:raw newuserinfo}}, {vb:raw newuserinfo.username}}</p>
{vb:raw template_hook.forumhome_wgo_stats}
</div>
</div>
<div id="wgo_legend" class="wgo_subblock section">
<h3 class="blocksubhead"><img src="{vb:stylevar imgdir_misc}/legend.png" alt="{vb:rawphrase icon_legend}" />{vb:rawphrase icon_legend}</h3>
<div>
<dl id="icon_legends" class="icon_legends">
<dt><img src="{vb:stylevar imgdir_statusicon}/forum_new-16.png" alt="{vb:rawphrase new_posts_forum}" /></dt><dd>{vb:rawphrase new_posts_forum}</dd>
<dt><img src="{vb:stylevar imgdir_statusicon}/forum_old-16.png" alt="{vb:rawphrase no_new_posts_forum}" /></dt><dd>{vb:rawphrase no_new_posts_forum}</dd>
<vb:if condition="$vboptions['showlocks']"><dt><img src="{vb:stylevar imgdir_statusicon}/forum_lock-16.png" alt="{vb:rawphrase forum_is_closed_for_posting}" /></dt><dd>{vb:rawphrase forum_is_closed_for_posting}</dd></vb:if>
<dt><img src="{vb:stylevar imgdir_statusicon}/category-16.png" alt="{vb:rawphrase category_forum}" /></dt><dd>{vb:rawphrase category_forum}</dd>
<dt><img src="{vb:stylevar imgdir_statusicon}/forum_link-16.png" alt="{vb:rawphrase link_forum}" /></dt><dd>{vb:rawphrase link_forum}</dd>
{vb:raw template_hook.forumhome_icon_legend}
</dl>
</div>
</div>
{vb:raw template_hook.forumhome_wgo_pos5}
</div>
</div>
<!-- end what's going on box -->

{vb:raw ad_location.board_below_whats_going_on}
<vb:if condition="$show['sidebar']">
</div>
</div>

<div id="sidebar_container" class="<vb:if condition="$show['sidebarposition'] == 'left'">sidebarleft</vb:if><vb:if condition="$close_sidebar"> sidebar_closed</vb:if>">
<a id="sidebar_button_link" href="#">
<vb:if condition="$show['sidebarposition'] == 'left'">
<img id="sidebar_button" src="{vb:stylevar imgdir_misc}/<vb:if condition="$close_sidebar">tab-expanded-left.png<vb:else />tab-collapsed-left.png</vb:if>" alt="" />
<vb:else />
<img id="sidebar_button" src="{vb:stylevar imgdir_misc}/<vb:if condition="$close_sidebar">tab-expanded.png<vb:else />tab-collapsed.png</vb:if>" alt="" />
</vb:if>
</a>
<ul id="sidebar" <vb:if condition="$close_sidebar">class="sidebar_hidden"</vb:if> >
{vb:raw sidebar}
</ul>
</div>
</vb:if>

<script type="text/javascript">
<!--
vbphrase['doubleclick_forum_markread'] = "{vb:rawphrase doubleclick_forum_markread}";
init_forum_readmarker_system();
//-->
</script>
{vb:raw footer}
</body>
</html>

kh99
02-11-2015, 08:45 AM
<h3 class="blocksubhead"><img src="{vb:stylevar imgdir_misc}/users_online.png" alt="DigiWeb Members Online" />DigiWeb Members <font color="lime">Online</font></h3>

HM666
02-11-2015, 09:44 AM
Yeah you could try that as well. If not try disabling the vSA legend hack and install a different legend hack. I have Ozzy's legend hack installed on my forum and do not have this issue.

SᴩiDᴇЯ
02-11-2015, 08:11 PM
<h3 class="blocksubhead"><img src="{vb:stylevar imgdir_misc}/users_online.png" alt="DigiWeb Members Online" />DigiWeb Members <font color="lime">Online</font></h3>


Why is there the image online.png in the code? Because I am not using any image, just text.
Should the image code be removed?

kh99
02-11-2015, 08:16 PM
Why is there the image online.png in the code? Because I am not using any image, just text.
Should the image code be removed?

I don't think there's any reason to take anything out. Do you have that code in your FORUMHOME template? If so then you must have the image showing. It looks like a little green guy.

SᴩiDᴇЯ
02-12-2015, 02:57 AM
I don't think there's any reason to take anything out. Do you have that code in your FORUMHOME template? If so then you must have the image showing. It looks like a little green guy.

Thank you for telling me about the little green guy, it was missing from my image/misc directory so when i copied users_online.png and refreshed my page it came 100% fixed:

https://vborg.vbsupport.ru/external/2015/02/9.jpg

Thank you everyone for taking the time to help me with my issue and i couldn't have done it without all your help, so thank you everyone very much.

kh99 i would like to thank you for pointing out the little green guy, because that has probably saved us all a lot of time trying to figure out why this can't be fixed, now thanks to you, it is fixed :)

Thank you.

Replicant
02-12-2015, 11:23 AM
If nobody is online, what does it look like? :cool:

ozzy47
02-12-2015, 11:39 AM
If nobody is online, what does it look like? :cool:

Like a ghost town. :p

HM666
02-12-2015, 11:54 AM
If nobody is online, what does it look like? :cool:

Very good point. There is not if/else statement but that was not the question :)

Replicant
02-12-2015, 01:40 PM
Here's the mod with online and offline statuses and no image needed.
https://vborg.vbsupport.ru/showthread.php?t=317293

HM666
02-12-2015, 02:04 PM
Great! :)