vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Show Thread Enhancements - Country Flag (https://vborg.vbsupport.ru/showthread.php?t=89247)

tnguy3n 05-31-2004 10:00 PM

Country Flag
 
Well, i looked all over the forums but couldn't find this countryflag mod; however, i found it on vb.org instead. I wonder why did awesome hack ain't officially released here for vb members. :)

All credits go to SmartGnome for orginal hack and AJR, Pingu and Stasik who made the hack for vb 2.2.x.

Go to AdminCP > Profile Fields > Add new Profile field > Single Select Menu >

Title > Country

Description > This shows your country flag in postbit.
Options: copy and paste list of country in flag_list.txt to this option field
Default Option: Yes, but not blank
Display Page: Thread Viewing

-----------------------
Optional:
Run this following query to set Undisclosed as default for all users or it would displays images as X's.
HTML Code:

UPDATE `userfield` SET `fieldX` = 'Undisclosed';
-----------------------

Templates edit:

in postbit(_legacy)

FIND
HTML Code:

<div>$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon]</div>
BELOW ADD:

HTML Code:

<if condition="$post[fieldX] != Undisclosed"><div>Country: <img src="$stylevar[imgdir_misc]/flags/$post[fieldX].gif" alt="$post[fieldX]" align="center" /> </div></if>
Change X to the field id.
Upload /flags to /images/misc/flags of your forum dir


Note:
Image: <if condition="$post[fieldX] != Undisclosed"><div>Country: <img src="$stylevar[imgdir_misc]/flags/$post[fieldX].gif" alt="$post[fieldX]" align="center" /> </div></if>
Text: <if condition="$post[fieldX] != Undisclosed"><div>Country: $post[fieldX]</div></if>

imported_chuanse 06-09-2004 07:16 PM

[high]* chuanse installs :D[/high]

imported_Kentaurus 06-10-2004 06:44 PM

Quote:

Originally Posted by tnguy3n
Well, i looked all over the forums but couldn't find this countryflag mod; however, i found it on vb.org instead. [...]

Nice mod, installed.

For the people with spanish forums, I have modified the flags_list file to reflect the Spanish name of the countries and the images for that. I attach the flag_list and the images if you want it to be in spanish.

imported_cinq 08-10-2004 09:11 AM

Just what I was looking for ! thanks ! :D

A question though, is it a must to set Display Page: Thread Viewing. Can it be on Edit Profile instead ?

pjdaley 08-11-2004 02:19 AM

Quote:

Originally Posted by cinq
Just what I was looking for ! thanks ! :D

A question though, is it a must to set Display Page: Thread Viewing. Can it be on Edit Profile instead ?

same hre, some of my members are going crazy, looking for it...

M1th 08-11-2004 05:50 PM

cinq, could put it anywhere you want.

as for running the UPDATE `userfield` SET `fieldX` = 'Undisclosed'; query. It's unnecessary, IMO. You could have an empty field in the first line and set it as default. Then using <if condition="$post[fieldX]"> flag code here </if> would give what you want.

pjdaley 08-25-2004 10:39 PM

Quote:

Originally Posted by M1th
cinq, could put it anywhere you want.

as for running the UPDATE `userfield` SET `fieldX` = 'Undisclosed'; query. It's unnecessary, IMO. You could have an empty field in the first line and set it as default. Then using <if condition="$post[fieldX]"> flag code here </if> would give what you want.

ok, but what would i do to put it on the Edit Profile area?

mholtum 08-28-2004 11:14 AM

Change this option:
Display Page: Edit Profile

trackpads 09-03-2004 04:47 AM

I went al litte further and created a gif called "Undisclosed.gif" and placed it in the flags folder on the server. I then removed the IF statement from the postbit so that it would show the undisclosed gif file as the default. The undisclosed gif is basically a small image reminding the user to update their profile :-)

Here you go-

http://www.trackpads.com/forum/showthread.php?t=135642

mholtum 09-03-2004 06:56 AM

So, all I have to do is remove that IF statement and this will work? Forgive me I am a n00b.


All times are GMT. The time now is 03:04 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.01380 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_html_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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