Customization > Blocks and Modifications

SMF Social Groups Block

<< < (2/3) > >>

ccbtimewiz:
You're welcome.

Mick.:
Can the group name be added above the group image?  :|

NIBOGO:

--- Quote from: BlueDevil on March 29, 2010, 07:22:21 PM ---Can the group name be added above the group image?  :|

--- End quote ---

Sure:


--- Code: ---global $smcFunc,   $scripturl;

 echo'Recent Groups:<br />';

$dbresult =   $smcFunc['db_query']('', '
   SELECT id_group, group_name, image
     FROM {db_prefix}social_groups
   ORDER BY id_group DESC
   LIMIT   5'); 
while ($row = $smcFunc['db_fetch_assoc']($dbresult))
{
     echo'<a   href="'.$scripturl.'?action=sgroups;sa=view;id='.$row['id_group'].'"><img   src="'.$row['image'].'" alt="'.$row['group_name'].'" /><br />'.$row['group_name'].'</a>';
}
$smcFunc['db_free_result']($dbresult);
--- End code ---

You can use some tags to center the text like <div align="center">'.$row['group_name'].'</div>

EvilGeneral:
Isn't work for me. =[
The image path is wrong.

PS: Most difficult thing in this forum is type the correct captcha. lol

angeljs:
The image link isn't working, how can this be fixed?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version