vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Show Thread Enhancements - Profile Fields in a Postbit Dropdown (https://vborg.vbsupport.ru/showthread.php?t=208360)

Jasem 03-19-2009 08:11 PM

Quote:

Originally Posted by Wired1 (Post 1768308)
Some have asked how to place links in the dropdown, so here's how to do it.

Change the conditionals in the Manual template like so:

Code:

        <if condition="$post['field6']">
                <tr><td class="vbmenu_option">Processor: <a href="ENTER URL HERE" rel="nofollow">$post[field6]</a></td></tr>
        </if>


Thank you very much!

Installed:

Arachnophiles 03-20-2009 06:59 AM


TigerC10
, would you by any chance know how to fix the problem wherein the dropdown extends off the page? Appears only to happen in Firefox.

Wired1 03-22-2009 05:21 PM

Quote:

Originally Posted by Saviour (Post 1771680)
TigerC10...

Thank you for your reply. It would seem the following recommendation made all the difference:
Code:

<div style="position:absolute; width:auto;" id="specs_$post[postid]" class="vbmenu_control">
I'm very grateful for your support, my friend.

Issue resolved!

Good to know! What determines the length now though?

TigerC10 03-23-2009 10:40 PM

Well, the length is determined by the CSS handler for each browser with that code segment. Because of the "position: absolute" property, it acts independently from the CSS of the items containing it. This might be why Firefox makes it go off the screen... But the "width: auto" is supposed to automatically size the div to the size of its contents.

You could try switching it to "position: relative" instead, but I think that would invalidate the "width: auto" property. I've never been a fan of CSS because of how it is handled differently between different browsers.

Saviour 03-23-2009 10:47 PM

Even though I know there's the ability to add a link using the afore mentioned process...it would be better if this mod allowed the use of the url bbcode tag in the profile field, since someone may want to link to something different then what can be coded in the template.

Say with what our site uses it for...I could enter my processor name and then link it to the manufacturer's website. Since everyone doesn't have the same processor...what was mentioned before about adding a link (by Jasem) is moot.

Wired1 03-23-2009 11:21 PM

Quote:

Originally Posted by Saviour (Post 1775397)
Say with what our site uses it for...I could enter my processor name and then link it to the manufacturer's website. Since everyone doesn't have the same processor...what was mentioned before about adding a link (by Jasem) is moot.

Heh, had that idea since day 1. Main problem is that when spammers enter in URLs for random computer parts (e.g. I always find porn sites as their CPU), I sure as hell don't want that link to be live.

Can't remember, but can you moderate profile fields/ I don't think you can (although you can moderate new accounts).

Saviour 03-24-2009 01:35 AM

Well...

We can moderate new users...and their posts...but the profile fields can't be moderated. However...isn't that what Moderators and Admins are for anyway? LOL! Keeps us honest...

This is actually one of the best mods on this site...and I'm glad you're letting us use it for free. However...I would think about incorporating links into these profile fields...and giving admin the ability to turn this feature on/off per user/usergroup.

We can dream can't we?

Thanks, again, Wired...

Steve

Wired1 03-24-2009 03:27 AM

I may look into making an alternate version of this, or an addon or something, where that's possible. The problem is where to store the URL for each profile field. It could be in a separate field, but then you've just doubled the # of profile fields, and this starts to get unwieldly in the admin area where you browse user info.

If the whole mod was moved over to its own table, that would solve some problems, but create some new ones. Kinda gets away from the KIS method.

Saviour 03-24-2009 04:05 AM

Ya know...thinking about this, I may have come up with a solution...

Why not just have one profile field...or just a user editable box, so a user can enter data, link it...then go to a new line and repeat the process for each item they'd like to add.

You could then take the data they entered and add it to the ajax menu.

For instance...

I'm using this Quick Reply box...and I can enter whatever I want for my System Specs...

Compaq Presario SR5507F
Iris8-GL6
Next Item
Next Item

And so on and so forth...

Then just parse this info into the menu...wouldn't that work?

TigerC10 03-24-2009 04:25 AM

Doing it that way would mean it wouldn't be standard. Someone could enter their CPU on the last line instead of the first. Can you dig it?

Although I've got a more elegant solution. Just enable the BBCode parser. Add these lines to the top of both of your plugins (automatic and manual):

Code:

require_once(DIR . '/includes/class_bbcode.php');
$parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());

$post[fieldxx] = $parser->do_parse($post[fieldxx], false, false, true, false, false, true);


This will allow you to enable bbCode for only certain profile fields, which will in turn let you use something like:
[url=http://www.tigerdirect.com/someproduct]My Awesome Computer Part[/url]
in the profile field.

It goes without saying, that the profile field would have to be "hidden" so it doesn't mess up on the user's profile page (you know how if it's visible, it adds it to a tab in the user's profile data). Of course, if you have some crazy bbcodes that do things with images... Those would be allowed. Somewhat not cool. You would have to replace the function call "fetch_tag_list()" with an array of the tags you want to allow to get around that.


All times are GMT. The time now is 02:41 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.02336 seconds
  • Memory Usage 1,746KB
  • 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_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)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