vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   How can I eliminate postbit links for guests? (https://vborg.vbsupport.ru/showthread.php?t=309681)

joeychgo 03-19-2014 08:19 AM

How can I eliminate postbit links for guests?
 
1 Attachment(s)
I want to make it so the username in the postbit, is not clickable for guests...

How can I do this?

Barcham 03-19-2014 01:59 PM

On my board, I have configured the GUEST user permissions so that they cannot view member profiles, or use the search function or view who's on line, etc... So while they can click on a handle and see the drop menu, clicking on any of the links simply brings them to a no permission log in screen that tells them they have to log in or register to see this page. Works fine for me.

joeychgo 03-19-2014 07:01 PM

its still a link that takes someone to another page. That's not what I want. I want it to not be a link at all for guests.

cellarius 03-19-2014 08:24 PM

Then you need to go through all templates and wrap conditions around the <a>-Tags. That dropdown does not only show up in postbit.

Seven Skins 03-19-2014 08:28 PM

Find in postbit template:

HTML Code:

{vb:raw memberaction_dropdown}
Replace it with:

HTML Code:

<vb:if condition="$show['guest']">{vb:raw post.musername}<vb:else />{vb:raw memberaction_dropdown}</vb:if>

joeychgo 03-19-2014 11:19 PM

1 Attachment(s)
that worked except all formatting is gone for the username.

ozzy47 03-19-2014 11:45 PM

What is happening by doing it that way is removing some of the classes needed for the display. Undo the above edit, then open your memberaction_dropdown template, and find the following:

Code:

<ul class="popupbody popuphover memberaction_body">
Above that add this:
Code:

<vb:if condition="$show['member']">
Then find the following:
Code:

</ul>
And below that add this:
Code:

</vb:if>

joeychgo 03-19-2014 11:58 PM

Hmmm.. That kind of worked Ozz --

http://www.lincolnvscadillac.com/for...traight-issues

The link to the profile is there but doesn't work unless you right click and open in a new window.



Ideally - it wouldn't have a link at all.

ozzy47 03-20-2014 12:00 AM

Ok give me a minute, stay tuned.

ozzy47 03-20-2014 12:04 AM

OK find this line:
Code:

        <a class="username {vb:raw memberinfo.online} popupctrl" href="{vb:link member, {vb:raw memberinfo}}" title="{vb:rawphrase {vb:raw memberinfo['onlinestatusphrase']}, {vb:raw memberinfo.username}}"><strong><vb:if condition="$memberinfo['musername']">{vb:raw memberinfo.musername}<vb:else />{vb:raw memberinfo.username}</vb:if></strong></a>
And change it to this:
Code:

        <a class="username {vb:raw memberinfo.online} popupctrl" <vb:if condition="$show['member']">href="{vb:link member, {vb:raw memberinfo}}"</vb:if> title="{vb:rawphrase {vb:raw memberinfo['onlinestatusphrase']}, {vb:raw memberinfo.username}}"><strong><vb:if condition="$memberinfo['musername']">{vb:raw memberinfo.musername}<vb:else />{vb:raw memberinfo.username}</vb:if></strong><vb:if condition="$show['member']"></a></vb:if>

joeychgo 03-20-2014 12:17 AM

if you meant in addition to the earlier.. Ive done it.

now all text in the first post is subject to hover / ul

http://www.lincolnvscadillac.com/for...traight-issues

ozzy47 03-20-2014 12:27 AM

Hmmm, ok back to the drawing board.

joeychgo 03-20-2014 12:30 AM

the goal here is to minimize links off page for guests.

ozzy47 03-20-2014 12:39 AM

Ok was your member action dropdown customized before, or was it stock?

joeychgo 03-20-2014 12:45 AM

stock I believe

ozzy47 03-20-2014 12:48 AM

Ok then replace the entire contents with this:

Code:

<div class="popupmenu memberaction<vb:if condition="$page_class"> {vb:raw page_class}</vb:if>">
    <vb:if condition="$show['guest']">
            <span class="username" style="font-size:{vb:stylevar font.fontSize}{vb:stylevar font.units};
            font-weight:bold;" title="{vb:rawphrase {vb:raw memberinfo['onlinestatusphrase']}, {vb:raw memberinfo.username}}"><strong><vb:if condition="$memberinfo['musername']">{vb:raw memberinfo.musername}<vb:else />{vb:raw memberinfo.username}</vb:if></strong></span>
    <vb:else />
            <a class="username {vb:raw memberinfo.online} popupctrl" <href="{vb:link member, {vb:raw memberinfo}}" title="{vb:rawphrase {vb:raw memberinfo['onlinestatusphrase']}, {vb:raw memberinfo.username}}"><strong><vb:if condition="$memberinfo['musername']">{vb:raw memberinfo.musername}<vb:else />{vb:raw memberinfo.username}</vb:if></strong></a>
    </vb:if>
        <vb:if condition="$show['member']">
                <ul class="popupbody popuphover memberaction_body">
                        <li class="left">
                                <a href="{vb:link member, {vb:raw memberinfo}}" class="siteicon_profile">
                                        {vb:rawphrase view_profile}
                                </a>
                        </li>
                       
                        <li class="right">
                                <a href="search.php?{vb:raw session.sessionurl}do=finduser&amp;userid={vb:raw memberinfo.userid}&amp;contenttype=vBForum_Post&amp;showposts=1" class="siteicon_forum" rel="nofollow">
                                        {vb:rawphrase view_forum_posts}
                                </a>
                        </li>
                       
                        <vb:if condition="$show['pmlink']">
                        <li class="left">
                                <a href="private.php?{vb:raw session.sessionurl}do=newpm&amp;u={vb:raw memberinfo.userid}" class="siteicon_message" rel="nofollow">
                                        {vb:rawphrase private_message}
                                </a>
                        </li>
                        </vb:if>
                       
                        <vb:if condition="$show['viewblog']">
                        <li class="right">
                                <a href="{vb:raw $vboptions.vbblog_url}{vb:if "$vboptions['vbblog_url']", '/', ''}blog.php?{vb:raw session.sessionurl}u={vb:raw memberinfo.userid}" class="siteicon_blog" rel="nofollow">
                                        {vb:rawphrase view_blog_entries}
                                </a>
                        </li>
                        </vb:if>
                       
                        <vb:if condition="$show['homepage']">
                        <li class="left">
                                <a href="{vb:raw memberinfo.homepage}" class="siteicon_homepage">
                                        {vb:rawphrase visit_homepage}
                                </a>
                        </li>
                        </vb:if>
                       
                        <vb:if condition="$show['viewarticles']">
                        <li class="right">
                                <a href="{vb:raw memberinfo.author_list_url}" class="siteicon_article" rel="nofollow">
                                        {vb:rawphrase view_articles}
                                </a>
                        </li>
                        </vb:if>
       
                        <vb:if condition="$show['addfriend']">
                        <li class="left">
                                <a href="profile.php?{vb:raw session.sessionurl}do=addlist&amp;userlist=buddy&amp;u={vb:raw memberinfo.userid}" class="siteicon_add">
                                        {vb:rawphrase add_as_contact}
                                </a>
                        </li>
                        </vb:if>
       
                        <vb:if condition="$show['emaillink']">
                        <li class="right">
                                <a href="sendmessage.php?{vb:raw session.sessionurl}do=mailmember&amp;u={vb:raw memberinfo.userid}" class="siteicon_email">
                                        {vb:rawphrase send_email}
                                </a>
                        </li>
                        </vb:if>
       
                        <vb:comment><li class="left">
                                <a href="search.php?{vb:raw session.sessionurl}do=finduser&userid={vb:raw memberinfo.userid}&starteronly=1&searchdate=30&beforeafter=after&contenttype=vBForum_Thread" class="siteicon_email">
                                        30 Days
                                </a>
                        </li></vb:comment>
       
                        {vb:raw template_hook.memberaction_dropdown_items}
                </ul>
        </vb:if>
</div>


joeychgo 03-20-2014 12:54 AM

That worked almost perfectly. only thing is the username is a little smaller then before....

ozzy47 03-20-2014 01:00 AM

Not that I can see on my site, there should be no reason it does that on yours. Since the css is in there:
Code:

style="font-size:{vb:stylevar font.fontSize}{vb:stylevar font.units};
            font-weight:bold;"


joeychgo 03-20-2014 01:04 AM

1 Attachment(s)
see

ozzy47 03-20-2014 01:11 AM

Hmmm, that is strange, care to give me a admin account so I can debug it on your site, as I can not replicate it on mine?

joeychgo 03-20-2014 01:25 AM

sure, stand by for a pm

ozzy47 03-20-2014 01:29 AM

Okie dokie.

ozzy47 03-20-2014 01:40 AM

Under normal circumstances the above would have worked for you, but you had a edit in your additional.css that was over riding the class, so I changed, font-size:{vb:stylevar font.fontSize}{vb:stylevar font.units}; to the following, font-size:20px;

So the final is this:
Code:

<div class="popupmenu memberaction<vb:if condition="$page_class"> {vb:raw page_class}</vb:if>">
    <vb:if condition="$show['guest']">
            <span class="username" style="font-size:20px; font-weight:bold;" title="{vb:rawphrase {vb:raw memberinfo['onlinestatusphrase']}, {vb:raw memberinfo.username}}"><strong><vb:if condition="$memberinfo['musername']">{vb:raw memberinfo.musername}<vb:else />{vb:raw memberinfo.username}</vb:if></strong></span>
    <vb:else />
            <a class="username {vb:raw memberinfo.online} popupctrl" <href="{vb:link member, {vb:raw memberinfo}}" title="{vb:rawphrase {vb:raw memberinfo['onlinestatusphrase']}, {vb:raw memberinfo.username}}"><strong><vb:if condition="$memberinfo['musername']">{vb:raw memberinfo.musername}<vb:else />{vb:raw memberinfo.username}</vb:if></strong></a>
    </vb:if>
        <vb:if condition="$show['member']">
                <ul class="popupbody popuphover memberaction_body">
                        <li class="left">
                                <a href="{vb:link member, {vb:raw memberinfo}}" class="siteicon_profile">
                                        {vb:rawphrase view_profile}
                                </a>
                        </li>
                       
                        <li class="right">
                                <a href="search.php?{vb:raw session.sessionurl}do=finduser&amp;userid={vb:raw memberinfo.userid}&amp;contenttype=vBForum_Post&amp;showposts=1" class="siteicon_forum" rel="nofollow">
                                        {vb:rawphrase view_forum_posts}
                                </a>
                        </li>
                       
                        <vb:if condition="$show['pmlink']">
                        <li class="left">
                                <a href="private.php?{vb:raw session.sessionurl}do=newpm&amp;u={vb:raw memberinfo.userid}" class="siteicon_message" rel="nofollow">
                                        {vb:rawphrase private_message}
                                </a>
                        </li>
                        </vb:if>
                       
                        <vb:if condition="$show['viewblog']">
                        <li class="right">
                                <a href="{vb:raw $vboptions.vbblog_url}{vb:if "$vboptions['vbblog_url']", '/', ''}blog.php?{vb:raw session.sessionurl}u={vb:raw memberinfo.userid}" class="siteicon_blog" rel="nofollow">
                                        {vb:rawphrase view_blog_entries}
                                </a>
                        </li>
                        </vb:if>
                       
                        <vb:if condition="$show['homepage']">
                        <li class="left">
                                <a href="{vb:raw memberinfo.homepage}" class="siteicon_homepage">
                                        {vb:rawphrase visit_homepage}
                                </a>
                        </li>
                        </vb:if>
                       
                        <vb:if condition="$show['viewarticles']">
                        <li class="right">
                                <a href="{vb:raw memberinfo.author_list_url}" class="siteicon_article" rel="nofollow">
                                        {vb:rawphrase view_articles}
                                </a>
                        </li>
                        </vb:if>
       
                        <vb:if condition="$show['addfriend']">
                        <li class="left">
                                <a href="profile.php?{vb:raw session.sessionurl}do=addlist&amp;userlist=buddy&amp;u={vb:raw memberinfo.userid}" class="siteicon_add">
                                        {vb:rawphrase add_as_contact}
                                </a>
                        </li>
                        </vb:if>
       
                        <vb:if condition="$show['emaillink']">
                        <li class="right">
                                <a href="sendmessage.php?{vb:raw session.sessionurl}do=mailmember&amp;u={vb:raw memberinfo.userid}" class="siteicon_email">
                                        {vb:rawphrase send_email}
                                </a>
                        </li>
                        </vb:if>
       
                        <vb:comment><li class="left">
                                <a href="search.php?{vb:raw session.sessionurl}do=finduser&userid={vb:raw memberinfo.userid}&starteronly=1&searchdate=30&beforeafter=after&contenttype=vBForum_Thread" class="siteicon_email">
                                        30 Days
                                </a>
                        </li></vb:comment>
       
                        {vb:raw template_hook.memberaction_dropdown_items}
                </ul>
        </vb:if>
</div>


joeychgo 03-20-2014 01:53 AM

Thank you :)))

ozzy47 03-20-2014 01:54 AM

Not a problem, glad to help. :)

Seven Skins 03-21-2014 03:06 PM

<a href="https://vborg.vbsupport.ru/showpost.php?p=2488399&postcount=5" target="_blank">This</a> is a tried and tested code, it did not work due to customization in other templates. Anyways problem has been solved.


All times are GMT. The time now is 04:55 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.01256 seconds
  • Memory Usage 1,838KB
  • 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
  • (9)bbcode_code_printable
  • (2)bbcode_html_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (26)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