MyBB Community Forums

Full Version: [Code Modification] 244 Countries Flags with Wiki Links in Postbit
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6
(2011-03-18, 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)

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>
Ive made a right hash of my postbit trying this, now ive lost the username display! AH
[Image: 2ik5n6g.jpg]
Thanks,
You've removed {$post['profilelink']} variable from the postbit_classic template.
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,
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>
Pulling my hair out on this one, heres what im geeting;
http://found-uk.net/forum/showthread.php?tid=1
Thanks,
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.
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,
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.
Pages: 1 2 3 4 5 6