Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> RavenNuke(tm) v2.5x
Author Message
derek765
Regular
Regular



Joined: Sep 27, 2012
Posts: 99
Location: Okinawa, Japan

PostPosted: Fri Nov 30, 2012 10:05 am Reply with quote

I am trying to add a bullet list circle icon to each module in the Nav list and having trouble adding it next to the modules, I added it for the Home link but can't seem to figure it out for the modules.

public_html/blocks/block-nukeNAV.php

Code:
$content = '<table border="0" cellpadding="0" cellspacing="0"><tr><td><ul class="' . $ListClass . '"><li class="li-first"><a href="./">• '._HOME."</a></li>\n";

$where = 'WHERE title != \'' . _MAINMODULE . '\' AND title != \'nukeNAV\'';
if (!is_admin($admin)) $where .= 'AND active=\'1\' AND inmenu=\'1\'';
$result3 = $db->sql_query('SELECT * FROM ' . $prefix . '_modules ' . $where . ' ORDER BY active DESC, inmenu DESC, custom_title ASC');
[/code]
 
View user's profile Send private message Visit poster's website
neralex
Site Admin



Joined: Aug 22, 2007
Posts: 1772

PostPosted: Fri Nov 30, 2012 10:21 am Reply with quote

Code:
<?php

/* nukeNAV(tm)     Copyright 2009 by Kevin Guske         http://www.nukeSEO.com

  This program is free software. You can redistribute it and/or modify it under the terms of the GNU
  General Public License as published by the Free Software Foundation; either version 2 of the License. */
if ( !defined('BLOCK_FILE') ) { Header("Location: ../index.php");   die();}
if (!isset($side)) { $side = ''; }
if ($side == 'c' || $side == 'd' || $side == 't') {
   $ListClass = 'nukeNAV-center nukeNAVmod';
   } else {
   $ListClass = 'nukeNAVmod';
}
$n = 2;
global $prefix, $db, $admin, $user, $ya_config;
$ThemeSel = get_theme();
if (file_exists('themes/' . $ThemeSel . '/module.php')) include('themes/' . $ThemeSel . '/module.php');
if (!defined('_MAINMODULE')) {
   $row = $db->sql_fetchrow($db->sql_query('SELECT * FROM ' . $prefix . '_main'));
   define('_MAINMODULE', $row['main_module']);
}
$content = '<table border="0" cellpadding="0" cellspacing="0"><tr><td><ul class="' . $ListClass . '"><li class="li-first"><a href="./">&bull; '._HOME."</a></li>\n";
$where = 'WHERE title != \'' . _MAINMODULE . '\' AND title != \'nukeNAV\'';
if (!is_admin($admin)) $where .= 'AND active=\'1\' AND inmenu=\'1\'';
$result3 = $db->sql_query('SELECT * FROM ' . $prefix . '_modules ' . $where . ' ORDER BY active DESC, inmenu DESC, custom_title ASC');
$la = $lim = 1;
while ($row3 = $db->sql_fetchrow($result3)) {
   $m_title = stripslashes($row3['title']);
   $custom_title = $row3['custom_title'];
   $view = intval($row3['view']);
   $groups = $row3['groups'];
   $active = intval($row3['active']);
   $inmenu = intval($row3['inmenu']);
   $m_title2 = str_replace('_', ' ', $m_title);
   if ($n % 2){$column = 'li-odd';} else if ($n==2) {$column = 'li-even li-next';} else {$column = 'li-even';}
   if ($custom_title > '') $m_title2 = $custom_title;
   if ($inmenu <> $lim and $active == 1) {
      $content .= '<li class="' . $column . '"><a>&bull; '._INVISIBLEMODULES."</a>\n".'<ul>'."\n"; // Start hidden menu
      $n++;
   }
   if ($active <> $la) {
      if ($lim == 0) $content .= '</ul>'."\n".'</li>'."\n";      // Close hidden menu
      $content .= '<li class="' . $column . '"><a>&bull; '._NOACTIVEMODULES."</a>\n".'<ul>'."\n";      // Start inactive menu
      $n++;
   }
   if (($view == 0) or ($view == 1 and is_user($user)) or ($view == 2 and is_admin($admin)) or ($view == 3 and paid()) or ($view > 3 AND in_groups($groups)) ) {
      if ((!$inmenu and $active == 1) OR ($active == 0)) {
         $content .= '<li><a href="modules.php?name='.$m_title.'">&bull; '.$m_title2.'</a>';
         } else {
         $content .= '<li class="' . $column . '"><a href="modules.php?name='.$m_title.'">&bull; '.$m_title2.'</a>';
         $n++;
      }
      if ($m_title == 'Your_Account') {
         if (!isset($ya_config)) {
            include_once('modules/Your_Account/includes/functions.php');
            $ya_config = ya_get_configs();
         }
         if (is_user($user)) {
            $content .= '<ul>';
            if (is_active('Private_Messages')) $content .= '<li><a href="modules.php?name=Private_Messages" title="">' . _BPM . '</a></li>';
            $content .= '<li><a href="modules.php?name=Your_Account&amp;op=edituser" title="">'. _BPREFS . '</a></li>';
            if ($ya_config['allowusertheme']=='1') $content .= '<li><a href="modules.php?name=Your_Account&amp;op=chgtheme" title="">' . _BCHGTHEME . '</a></li>';
            $content .= '<li><a href="modules.php?name=Your_Account&amp;op=logout" title="">' . _LOGOUT . '</a></li></ul>';
         } else {
            $content .= '
            <ul>
            <li><a href="modules.php?name=Your_Account" title="">' . _LOGIN . '</a></li>';
            if ($ya_config['allowuserreg']=='1') $content .= '
            <li><a href="modules.php?name=Your_Account&amp;op=new_user" title="">' . _BREG . '</a></li>';
            $content .= '
            </ul>';
         }
      }
      $content .= "</li>\n";
  }
   $la = $active; $lim = $inmenu;
}
if ($la == 0 or $lim == 0) $content .= '</ul></li>';  // Close hidden or inactive menu
$content .= '</ul></td></tr></table>';
/* If you copied a new module is the /modules/ directory, it will be added to the database */
/*  Make this an admin function on the modules admin page??
if (is_admin($admin)) {
   $handle=opendir('modules');
   while ($file = readdir($handle)) {
      if ( (!preg_match("/[.]/", $file)) ) $modlist .= $file . ' ';
   }
   closedir($handle);
   $modlist = explode(" ", $modlist);
   sort($modlist);
   for ($i=0; $i < sizeof($modlist); $i++) {
      if($modlist[$i] != '') {
         $row4 = $db->sql_fetchrow($db->sql_query('SELECT mid FROM ' . $prefix . '_modules WHERE title=\''. $modlist[$i] . '\''));
         $mid = intval($row4['mid']);
         $mod_uname = str_replace('_', ' ', $modlist[$i]);
         if ($mid == "") $db->sql_query('INSERT INTO ' . $prefix . '_modules VALUES (NULL, \'' . $modlist[$i] . '\', \'' . $mod_uname . '\', \'0\', \'0\', \'\', \'1\', \'0\', \'\')');      }
   }
}
*/
?>

_________________
Github: RavenNuke 
View user's profile Send private message
spasticdonkey
RavenNuke(tm) Development Team



Joined: Dec 02, 2006
Posts: 1693
Location: Texas, USA

PostPosted: Fri Nov 30, 2012 10:26 am Reply with quote

I would do this via CSS rather than editing the block. Create a nukeNAV.css file for your theme and try something like the following. You may have to adjust the width and may not need to float unless using wide block columns. There may be other changes required but start here.

Code:
.nukeNAVmod li{width:120px;float: left;

    list-style: none outside none;
    margin: 0 0 4px;
    min-height: 16px;
    min-width: 120px;
    padding: 0 4px 0 20px;
    width: auto;background-image: url(../../../images/blocks/bullet-black.png); background-repeat:no-repeat; background-color:transparent;}
 
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> RavenNuke(tm) v2.5x

View next topic
View previous topic
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
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©