|
|
| Author |
Message |
kotorisan
Nucleus Newbie
Joined: 07 Feb 2009
Posts: 11
|
Posted: Wed Feb 16, 2011 4:29 am Post subject: display:how to separate SKIN_PARTS and SKIN_PARTS_SPECIAL on
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&skinid='.$current->sdnumber.'&type='.$type.'" tabindex="'.$template['tabindex'].'">' . htmlspecialchars($friendlyNames[$type]) . "</a></li>";
+ $parts[0][] = '<li>' . helpHtml('skinpart'.$type) . ' <a href="index.php?action=skinedittype&skinid='.$current->sdnumber.'&type='.$type.'" tabindex="'.$template['tabindex'].'">' . htmlspecialchars($friendlyNames[$type]) . "</a></li>";
} else {
- $types[$i] = '<li>' . helpHtml('skinpartspecial') . ' <a href="index.php?action=skinedittype&skinid='.$current->sdnumber.'&type='.$type.'" tabindex="'.$template['tabindex'].'">' . htmlspecialchars($friendlyNames[$type]) . "</a></li>";
+ $parts[1][] = '<li>' . helpHtml('skinpartspecial') . ' <a href="index.php?action=skinedittype&skinid='.$current->sdnumber.'&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&skinid=$current->sdnumber' tabindex='".$template['tabindex']."'>"._LISTS_EDIT."</a></td>";
|
|
|
Back to top
|
|
ftruscot
Nucleus Guru

Joined: 22 Feb 2006
Posts: 7449
Location: Massachusetts
|
Posted: Wed Feb 16, 2011 5:15 pm Post subject:
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
|
|
|
|
|
|
Page 1 of 1
All times are GMT + 1 Hour
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
|