Nucleus Support Forum Index

Find on the forum:
any terms  all terms  Advanced Search

RSS 2.0
Browse posts: Unanswered | Mark all read

« »
Loading Nucleus FAQ ticker...
Post new topic Reply to topic
Author Message
kotorisan
Nucleus Newbie


Joined: 07 Feb 2009
Posts: 11

Post Posted: Wed Feb 16, 2011 4:29 am   Post subject: display:how to separate SKIN_PARTS and SKIN_PARTS_SPECIAL on
Reply with quote

display:how to separate SKIN_PARTS and SKIN_PARTS_SPECIAL on show

Code:

Index: trunk/nucleus/nucleus/libs/showlist.php
===================================================================
--- trunk/nucleus/nucleus/libs/showlist.php   (revision 1498)
+++ trunk/nucleus/nucleus/libs/showlist.php   (working copy)
@@ -590,6 +590,7 @@
             // show list of defined parts
             $r = sql_query('SELECT stype FROM '.sql_table('skin').' WHERE sdesc='.$current->sdnumber . ' ORDER BY stype');
             $types = array();
+            $parts = array(array(),array());
             while ($o = sql_fetch_object($r))
                array_push($types,$o->stype);
             if (sizeof($types) > 0) {
@@ -597,12 +598,16 @@
                for ($i=0;$i<sizeof($types);$i++) {
                   $type = $types[$i];
                   if (in_array($type, array('index', 'item', 'archivelist', 'archive', 'search', 'error', 'member', 'imagepopup'))) {
-                     $types[$i] = '<li>' . helpHtml('skinpart'.$type) . ' <a href="index.php?action=skinedittype&amp;skinid='.$current->sdnumber.'&amp;type='.$type.'" tabindex="'.$template['tabindex'].'">' . htmlspecialchars($friendlyNames[$type]) . "</a></li>";
+                     $parts[0][] = '<li>' . helpHtml('skinpart'.$type) . ' <a href="index.php?action=skinedittype&amp;skinid='.$current->sdnumber.'&amp;type='.$type.'" tabindex="'.$template['tabindex'].'">' . htmlspecialchars($friendlyNames[$type]) . "</a></li>";
                   } else {
-                     $types[$i] = '<li>' . helpHtml('skinpartspecial') . ' <a href="index.php?action=skinedittype&amp;skinid='.$current->sdnumber.'&amp;type='.$type.'" tabindex="'.$template['tabindex'].'">' . htmlspecialchars($friendlyNames[$type]) . "</a></li>";
+                     $parts[1][] = '<li>' . helpHtml('skinpartspecial') . ' <a href="index.php?action=skinedittype&amp;skinid='.$current->sdnumber.'&amp;type='.$type.'" tabindex="'.$template['tabindex'].'">' . htmlspecialchars($friendlyNames[$type]) . "</a></li>";
                   }
                }
-               echo '<br /><br />',_LIST_SKINS_DEFINED,' <ul>',implode($types,'') ,'</ul>';
+               echo '<br /><br />',_LIST_SKINS_DEFINED,'<br />';
+               if (count($parts[0]) > 0)
+                 echo _SKIN_PARTS_TITLE .   ' <ul>'.implode($parts[0]).'</ul>';
+               if (count($parts[1]) > 0)
+                 echo _SKIN_PARTS_SPECIAL . ' <ul>'.implode($parts[1]).'</ul>';
             }
          echo "</td>";
          echo "<td style=\"white-space:nowrap\"><a href='index.php?action=skinedit&amp;skinid=$current->sdnumber' tabindex='".$template['tabindex']."'>"._LISTS_EDIT."</a></td>";

Back to top

View user's profile Send private message
ftruscot
Nucleus Guru
Nucleus Guru


Joined: 22 Feb 2006
Posts: 7449
Location: Massachusetts

Post Posted: Wed Feb 16, 2011 5:15 pm   Post subject:
Reply with quote

The point here is in the admin area to list the core skin parts grouped together separate from the custom defined special skin parts? Not a bad notion. I will look into implementing going forward.
_________________
Is your question not solved yet?
Search our FAQ,
read the Documentation, or
browse the list of available plugins.

Check out my plugins

Back to top

View user's profile Send private message Visit poster's website
Post new topic Reply to topic
Display posts from previous:   

Page 1 of 1

All times are GMT + 1 Hour

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2001, 2002 phpBB Group