Thread Rating:
  • 3 Vote(s) - 4.33 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Code Modification] 244 Countries Flags with Wiki Links in Postbit
#21
(03-18-2011, 07:46 PM)bigoliver Wrote: The problem is that my members that have not set a flag or Undisclosed get a broken image next to them, I have nearly 500 members so can't go through them all.

Is there a way to set all users automatically to Undisclosed unless they have selected otherwise.

I will have to remove this until it can be fixed.

Thanks,

Oliver

I see your point if choosing a flag is not a requirement at registration, then they will show a broken image displayed. And it happens because an image it served by default called: images/.png. (it has no file name)!

The only work around I can see with this is to make choosing a flag requirement on registration, then it doesn't happen and they'll be assigned the very first one I've took notice "even if not selecting one" themselves manually.

Just a bit curious though why it's trying to serve a default image with no file-name called (.png)

Reply
#22
So where does this bit go???

PHP Code
<a target="blank" href="http://en.wikipedia.org/wiki/Especial:Search?search={$post['fidX']}&fulltext=&go=Go" title="Look up {$post['fidX']} on wikipedia"
 style="cursor:help;" class="wiki"><img src="images/flags/{$post['fidX']}.png" ALIGN=ABSMIDDLE></a>
Reply
#23
Ive made a right hash of my postbit trying this, now ive lost the username display! AH
[Image: 2ik5n6g.jpg]
Thanks,
Reply
#24
You've removed {$post['profilelink']} variable from the postbit_classic template.
Reply
#25
Sort now, i loaded up another theme and copied its 'postbit'

Can someone please shed me some light on this;
{$ignore_bit}
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="{$post_extra_style} {$post_visibility}" id="post_{$post['pid']}">
	<tr>
		<td class="{$altbg}" width="15%" valign="top" style="white-space: nowrap; text-align: center;"><a name="pid{$post['pid']}" id="pid{$post['pid']}"></a>
		<strong><span class="largetext">{$post['profilelink']}</span></strong> <a&nbsp;target="blank"&nbsp;href="http://en.wikipedia.org/wiki/Especial:Search?search={$post['fidX']}&fulltext=&go=Go"&nbsp;title="Look&nbsp;up&nbsp;{$post['fidX']}&nbsp;on&nbsp;wikipedia"
&nbsp;style="cursor:help;"&nbsp;class="wiki"><img&nbsp;src="images/flags/{$post['fid4']}.png"&nbsp;ALIGN=ABSMIDDLE></a> {$post['onlinestatus']}<br />
		<span class="smalltext">
			{$post['usertitle']}<br />
			{$post['userstars']}
			{$post['groupimage']}
			{$post['useravatar']}<br />
			{$post['user_details']}
		</span>
	</td>
This is part of my postbit is it right???
Thanks,
Reply
#26
Replace above with this;
{$ignore_bit}
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="{$post_extra_style} {$post_visibility}" id="post_{$post['pid']}">
    <tr>
        <td class="{$altbg}" width="15%" valign="top" style="white-space: nowrap; text-align: center;"><a name="pid{$post['pid']}" id="pid{$post['pid']}"></a>
        <strong><span class="largetext">{$post['profilelink']}</span></strong> <a target="_blank" href="http://en.wikipedia.org/wiki/Especial:Search?search={$post['fidX']}&fulltext=&go=Go" title="Look up {$post['fidX']} on wikipedia"
 style="cursor:help;" class="wiki"><img src="images/flags/{$post['fid4']}.png" ALIGN=ABSMIDDLE></a> {$post['onlinestatus']}<br />
        <span class="smalltext">
            {$post['usertitle']}<br />
            {$post['userstars']}
            {$post['groupimage']}
            {$post['useravatar']}<br />
            {$post['user_details']}
        </span>
    </td>
Reply
#27
Pulling my hair out on this one, heres what im geeting;
http://found-uk.net/forum/showthread.php?tid=1
Thanks,
Reply
#28
Don't waste you time because if nobody picks a country they get a missing image displayed. I had this working all over my forum in different areas also like profiles and member list. But there is no way around that stupid issue with it.

Because you can't use permissions in templates, you can't add a permission maybe show a default image if a country is not picked. The only way around it is to force all new users to choose a flag at registration page.
Reply
#29
yea, would be nice if some could edit it if new members dont pick a country it would display nothing.
Thanks,
lol, i thought the wiki was something to do with getting the flag up!!!
Edited my code to this
{$post['usertitle']} <img src="images/flags/{$post['fid4']}.png" ALIGN=ABSMIDDLE> <br />
Thanks,
Reply
#30
Well, there is a hack out there (mod) that let's you use permissions in templates if you don't mind using it. I never did because it makes your community less secure then. But that could be used first and then permissions to do that with a default no-flag could be done.

Matter of choice, I wasn't installing that making my forum less secure just to show some flags.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)