Advertisement:

Button problems...

Aloittaja GMCbris, kesäkuu 30, 2008, 12:09:06 IP

« edellinen - seuraava »

GMCbris

I have asked this question elsewhere in the forum (In the Mod support thread) and on the mod developers own site

And I have had no luck in getting some help

My problem is coding - I am a complete novice, but I have had a go at it.  There are some issues but I feel I am very close

Can some one please have a look and let me know where I am going wrong:

I have a text button that looks ugly



So I have been trying to make it look like the other buttons next to it... I have had a go at the code and came up with this... and it almost works.. it just sends the uses to the left hadnd side of the screen and the CHAT name is no where near the image I made for it

// FlashChat!
global $modSettings;
if ($context['user']['is_logged'])
echo ($current_action == 'chat' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td>',($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/chatbutton.GIF" alt="' . $txt[182] . '"/>' : ''),'
</td><td>&nbsp;<a href="', $scripturl, '?action=chat">Chat</a></td>', (!empty($modSettings['fc_newWindow']) ? ' target="_blank"' : ''), '>', $txt['fc_chat'], (!empty($modSettings['fc_showUserCount']) && !empty($context['num_chat']) ? ' [<strong>' . $context['num_chat'] . ' ' . ($context['num_chat'] == 1 ? $txt['user'] : $txt['users']) . '</strong>]' : ''), '</a>
</td>' , $current_action == 'chat' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';


This is what the rest of the buttons look like (The ones directly to the left of the new button)... well the code for them anyway

   // How about the [search] button?
if ($context['allow_search'])
echo '<td>',($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/esearch.gif" alt="' . $txt[182] . '"/>' : ''),'
</td><td>&nbsp;<a href="', $scripturl, '?action=search">Explore</a></td>';



This is the code that they gave me the text button as shown in the above "pic snap" that didnt look great

// FlashChat! global $modSettings; if ($context['user']['is_logged']) echo ($current_action == 'chat' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , ' <td valign="top" class="maintab_' , $current_action == 'chat' ? 'active_back' : 'back' , '"> <a href="', $scripturl, '?action=chat"', (!empty($modSettings['fc_newWindow']) ? ' target="_blank"' : ''), '>', $txt['fc_chat'], (!empty($modSettings['fc_showUserCount']) && !empty($context['num_chat']) ? ' [<strong>' . $context['num_chat'] . ' ' . ($context['num_chat'] == 1 ? $txt['user'] : $txt['users']) . '</strong>]' : ''), '</a> </td>' , $current_action == 'chat' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';


ANY HELP IS APPRECIATED...

Thanks in advance

GMC

vbgamer45

Do something like



// Flash chat
   if ($context['allow_search'])
      echo '<td>',($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/chatbutton.GIF" alt="Chat"/>' : ''),'
            </td><td>&nbsp;<a href="', $scripturl, '?action=chat">Chat</a></td>';
Community Suite for SMF - Grow your forum with SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com - Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

GMCbris

I did try something similar to this and gave up on it for two reasons

1.  I am stupid
2.  I am stupid

Thanks for the amazingly simple solution

GMC

If I can impose just a little bit more - is there a way to make the "space" between the image and the text smaller - more in line with the rest of the buttons


GMCbris

Lainaus käyttäjältä: GMCbris - heinäkuu 01, 2008, 09:32:45 AP
I did try something similar to this and gave up on it for two reasons

1.  I am stupid
2.  I am stupid

Thanks for the amazingly simple solution

GMC

If I can impose just a little bit more - is there a way to make the "space" between the image and the text smaller - more in line with the rest of the buttons


Can anyone see how I can fix this ??

Thanks

DonGiovanni


GMCbris

Lainaus käyttäjältä: DonGiovanni - heinäkuu 06, 2008, 09:24:07 AP
remove &nbsp; from code

Sorry.. should have mentioned it

I tried that... and nothing, no change

It appears, in my non code brain, that Chat is right justified where it needs to be left... is there a way to change its position

Yes I know nothing about coding

GMC

DonGiovanni



DonGiovanni

try this

if ($context['allow_search'])
      echo '<td>',($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/chatbutton.GIF" alt="Chat"/>' : ''),'
            <a href="', $scripturl, '?action=chat">Chat</a></td>';

GMCbris

Lainaus käyttäjältä: DonGiovanni - heinäkuu 09, 2008, 05:53:29 AP
try this

if ($context['allow_search'])
      echo '<td>',($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/chatbutton.GIF" alt="Chat"/>' : ''),'
            <a href="', $scripturl, '?action=chat">Chat</a></td>';


Now we are close



Any thoughts on this problem

Thank you so much for having a look at his for me

DonGiovanni

try again this

// Flash chat
   if ($context['allow_search'])
      echo '<td>',($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/chatbutton.GIF" />' : ''),'
            </td><td><a href="', $scripturl, '?action=chat">Chat</a></td>';

GMCbris

Lainaus käyttäjältä: DonGiovanni - heinäkuu 09, 2008, 12:37:01 IP
try again this

// Flash chat
   if ($context['allow_search'])
      echo '<td>',($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/chatbutton.GIF" />' : ''),'
            </td><td><a href="', $scripturl, '?action=chat">Chat</a></td>';


Hi

We are back to this




Thanks again for trying

GMC

DonGiovanni

can you give us link to site

GMCbris

Lainaus käyttäjältä: DonGiovanni - heinäkuu 10, 2008, 04:22:47 AP
can you give us link to site
As it has warez and adult material I have sent you a PM with it

Cheers

GMC

Advertisement: