vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Add-On Releases - Country Flags - Postbit & Postbit_Legacy. vB 4.0.x (Inc GO (https://vborg.vbsupport.ru/showthread.php?t=229511)

Guardian Hope 06-12-2015 12:12 PM

I don't know if anyone has already posted this but I had to make a few adjustments to the what's inserted into the template to get it working in vBulletin 4.2.2 PL4 using Postbit Legacy naturally.

I chose to place it under the built in "Location" field but you can really put it anywhere you want.

In postbit_legacy find:
HTML Code:

<vb:if condition="$post['field2']"><dt>{vb:rawphrase location_perm}</dt> <dd>{vb:raw post.field2}</dd></vb:if>
Add directly below:

HTML Code:

                                        <!-- Country Flags Start -->
<vb:if condition="$post['fieldX']"><dt><style="text-align:left"> Country:</dt> <dd><img src="/forums/images/buttons/flags/{vb:raw post.fieldX}.GIF" align="middle" alt="{vb:raw post.fieldX}" border="" /></dd></vb:if> 
<!-- Country Flags End -->

Replace fieldX with the field you used for the Countries.

The last thing to note is that this assumes the location of the flags is /forums/images/buttons/flags so adjust accordingly.

Just a friendly "FYI" for anyone trying to get this running on 4.2.2. Works like a charm too.

SYGRecon 07-21-2015 04:50 PM

Quote:

Originally Posted by Guardian Hope (Post 2547676)
I don't know if anyone has already posted this but I had to make a few adjustments to the what's inserted into the template to get it working in vBulletin 4.2.2 PL4 using Postbit Legacy naturally.

I chose to place it under the built in "Location" field but you can really put it anywhere you want.

In postbit_legacy find:
HTML Code:

<vb:if condition="$post['field2']"><dt>{vb:rawphrase location_perm}</dt> <dd>{vb:raw post.field2}</dd></vb:if>
Add directly below:

HTML Code:

                                        <!-- Country Flags Start -->
<vb:if condition="$post['fieldX']"><dt><style="text-align:left"> Country:</dt> <dd><img src="/forums/images/buttons/flags/{vb:raw post.fieldX}.GIF" align="middle" alt="{vb:raw post.fieldX}" border="" /></dd></vb:if> 
<!-- Country Flags End -->

Replace fieldX with the field you used for the Countries.

The last thing to note is that this assumes the location of the flags is /forums/images/buttons/flags so adjust accordingly.

Just a friendly "FYI" for anyone trying to get this running on 4.2.2. Works like a charm too.


I'm using 4.2.2PL4 and I got everything to work except I can't seem to get the pictures to show? It's just showing image error with the title of the file.. I put them into my public_html -> Images -> Buttons -> Flags

I extracted all the flag gif's into one folder, was I not supposed to do that? I don't know what I'm doing wrong.

friendlymela 07-22-2015 05:20 AM

hmm nice mod

Fizzgig 08-09-2015 11:38 AM

Works well

bremereric 10-04-2015 01:02 AM

1 Attachment(s)
Here we go...pictures are in the right location. The word of the flag lands in the correct position underneath the location. I posted screen shots of everything.

Attachment 153443

Attachment 153444

Attachment 153445

Attachment 153446

Attachment 153447

Attachment 153448

ArcadeSyndicate 10-04-2015 04:40 AM

hello, please check your uploaded images again.

i've taken a look at your website and for example

http://www.aspenandvolare.com/forums...gs/Germany.GIF

doesn't exist in that location too.

bremereric 10-04-2015 09:18 AM

Yes I took the /forum out of the code because they were not there.

<!-- Country Flags Start -->
<vb:if condition="$post['field5']"><dt><style="text-align:left"> Country:</dt> <dd><img src="/images/buttons/flags/{vb:raw post.field5}.GIF" align="middle" alt="{vb:raw post.field5}" border="" /></dd></vb:if>
<!-- Country Flags End -->

John Lester 10-06-2015 02:57 AM

Looks like you fixed it :)

darksidemon2 10-16-2015 01:07 PM

Quote:

Originally Posted by wEbAddEr (Post 2511019)
works this way with vb4.2.3.beta1

Code:

<!-- Wy Country Flags Start -->
<div align="left">Country: </dt>
<vb:if condition="$post['fieldX']">
    <img src="http://www.YOURSITE.com/forum/images/flags/{vb:raw post.fieldX}.GIF" alt="Users Flag!" align="center" border="" /></vb:if></div>
<!-- Wy Flags End -->


thanks
works this way with Version 4.2.3

ArcadeSyndicate 11-08-2015 04:51 PM

replace Users Flag! with {vb:raw post.fieldX} to show countryname when hovering ;)


All times are GMT. The time now is 01:05 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.01806 seconds
  • Memory Usage 1,750KB
  • 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
  • (1)bbcode_code_printable
  • (4)bbcode_html_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (2)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