SimplePortal

Customization => Custom Coding => Topic started by: Mick. on December 27, 2009, 11:28:11 AM

Title: Seeking code clean up
Post by: Mick. on December 27, 2009, 11:28:11 AM
Can anyone clean this code for me?  This for the latest pics from SMF gallery media.

I keep getting this error:

Quote
Use of undefined constant Owner - assumed 'Owner'


Code: [Select]
global $sourcedir, $user_info, $ID_MEMBER, $context, $txt, $galurl, $galurl2, $scripturl, $settings, $db_prefix;

   require_once($sourcedir . '/Subs-MGallery.php');
   loadMGal_Settings();

   if(loadlanguage('MGallery') == false)
      loadLanguage('MGallery', 'english');
   $items = getMediaItems(0, 5, 'm.id_media DESC');

echo '

<table border="0" width="100%" cellspacing="1" cellpadding="4">
<br />
     
';
   foreach($items as $item)
      echo '

   <td class="windowbg2">

   <div class="smalltext" style=" line-height: 1.4em; border: 0px #000000 solid; padding: 5px;">
     
      <a href="',$galurl,'sa=item;id=',$item['id'],'"><img alt="" src="',$galurl,'sa=media;id=',$item['id'],';thumb" alt="" /></a><br />
     
      ',Owner,': <a href="',$scripturl,'?action=profile;u=',$item['poster_id'],'">',$item['poster_name'],'</a><br />
     
     
   </div>
   </td>';

echo '
   </tr>
</table>';


Title: Re: Seeking code clean up
Post by: ccbtimewiz on December 27, 2009, 12:12:51 PM
Find:

Code: [Select]
',Owner,': <a href="',$scripturl,'?action=profile;u=',$item['poster_id'],'">',$item['poster_name'],'</a><br />
Replace with:
Code: [Select]
Owner: <a href="',$scripturl,'?action=profile;u=',$item['poster_id'],'">',$item['poster_name'],'</a><br />
Title: Re: Seeking code clean up
Post by: Mick. on December 27, 2009, 12:19:06 PM
Thanx,   ill tru it out ;)
SimplePortal 2.3.8 © 2008-2024, SimplePortal