vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=229)
-   -   Mini Mods - Steam Community Profile in Postbit (https://vborg.vbsupport.ru/showthread.php?t=195272)

AzH 11-01-2008 10:00 PM

Steam Community Profile in Postbit
 
Hi. This is a quick dirty little edit which allows a user to display a link to their Steam Community Profile in their postbit. This mod is brought to you courtesy of http://left4deadforums.com.

First create a New User Profile Field:

Title: Steam Community Profile

Description: Your <a target="_blank" href="https://steamcommunity.com/"><b>Steam Community</b></a> profile page. Please only enter the final part of the URL. For example: "http://steamcommunity.com/id/left4deadforums" I would enter only "<b>left4deadforums</b>".

Default Value: LEAVE THIS BLANK

Max length of allowed user input: 30 (will prevent people posting the full URL. This is a "good thing".)

Field Length: 25

Profile Field Type: Single-Line Text Box

Field Required: No

Field Editable by User: Yes

Private Field: Yes

Field Searchable on Members List: Yes

Show on Members List: Yes

Regular Expression: LEAVE THIS BLANK

Hit save and make a note of the profile field ID for the next step.

Edit template POSTBIT. Find:

PHP Code:

<if condition="$post['age']"><div>$vbphrase[age]: $post[age]</div></if> 

Add below:

PHP Code:

<if condition="$post['fieldX']"><div>Steam ID: <a href="http://steamcommunity.com/id/$post[fieldX]target="_blank">$post[fieldX]</a></div></if> 

Replace ['fieldX'] with the number of your new profile field.


Save and you're done. Voila!!


DEMO: http://left4deadforums.com/835-left-...movie-1-a.html

Fynnon 11-10-2008 08:19 PM

very nice but i get:
Code:

You did not enter the correct format for the Steam Community Profile field. Please read the field description for the expected format.
i entered the correct id...

johkalhaups 11-11-2008 02:24 AM

If you want to add this mod as a little steam icon where your IM icons are:

Find this in postbit:

Code:

<div>$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon] $post[skypeicon]


Add this right below:

Code:

<if condition="$post[fieldXX]">
<a href="http://steamcommunity.com/id/$post[fieldXX]" target="_blank"><img src ="$stylevar[imgdir_misc]/steam.gif"border="0"alt="View Member's Steam Community Profile"></a>
</if>


Upload the attachment to:

/images/misc


Dont forget to replace fieldXX with your field number you made.



Demo: http://www.theriseoftsm.com/forums/s...ead.php?t=2613

AzH 11-13-2008 08:15 PM

Quote:

Originally Posted by Fynnon (Post 1663123)
very nice but i get:
Code:

You did not enter the correct format for the Steam Community Profile field. Please read the field description for the expected format.
i entered the correct id...

Where did you get that?

AzH 11-13-2008 08:16 PM

Ahh....

Sorry, my bad. Leave Regular Expression: and Default Value: blank.

Fynnon 11-14-2008 11:41 AM

yeah..working now :-)

10x

mlthmp 02-01-2009 04:25 PM

I realize its been awhile since anyone has posted here, but I've recently had a request to add such a mod and thought I'd give this one a try.

Here are the edits I've made to my postbit.
<if condition="$post['field18']"><div>Steam ID: <a href="http://steamcommunity.com/id/$post[field18]" target="_blank">$post[field18]</a></div></if>

I've also added the one above to add the image,
<if condition="$post[field18]">
<a href="http://steamcommunity.com/id/$post[field18]" target="_blank"><img src ="$stylevar[imgdir_misc]/steam.gif"border="0"alt="View Member's Steam Community Profile"></a>
</if>

However nothing is wanting to work. Does anyone notice any bonehead mistakes I've made in my edits? The field I made was field18.

AzH 02-01-2009 08:21 PM

What do you mean by "nothing wants to work"? Can you supply your URL and more information as to the issues you're having?

DontWannaName 03-04-2009 08:16 PM

Does this work on 3.8.1? I see your forum is so im guessing it does.

AzH 03-04-2009 11:08 PM

Works perfectly in 3.8.x


All times are GMT. The time now is 09:10 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.01377 seconds
  • Memory Usage 1,747KB
  • 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
  • (4)bbcode_code_printable
  • (2)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (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