PHP Web Host - Quality Web Hosting For All PHP Applications Free RavenNuke(tm) Add Ons
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
eldorado
Involved
Involved


Joined: Sep 10, 2008
Posts: 414
Location: France,Translator

PostPosted: Wed Jun 03, 2009 7:34 am Reply with quote Back to top

I'm trying to get gfx_admin working with some funny panes.
script demo is here.
Only registered users can see links on this board!
Get registered or login to the forums!


eldorado wrote:
my script:
in admin.php find GraphicAdmin()
Code:
function GraphicAdmin() {
  global $aid, $admingraphic, $language, $admin, $prefix, $db, $counter, $admin_file;
  $newsubs = $db->sql_numrows($db->sql_query('SELECT qid FROM '.$prefix.'_queue'));
  $row = $db->sql_fetchrow($db->sql_query('SELECT name, radminsuper FROM '.$prefix.'_authors WHERE aid=\''.$aid.'\''));
  $radminsuper = intval($row['radminsuper']);
  if ($radminsuper == 1) {
     OpenTable();
// Begins some tabs here
   echo '<div id="dhtmlgoodies_tabView1">';
   echo '<div class="dhtmlgoodies_aTab">';
   echo '<img src="/images/dhtmlgoodies_logo1.gif" style="float:left;margin-right:5px;margin-bottom:5px">';
    echo '<center><a href="'.$admin_file.'.php"><font class="title">'._ADMINMENU.'</font></a>';
    echo '<br /><br /></center>';
    echo'<table align="center" border="0" width="100%" cellspacing="1"><tr>';
    $linksdir = dir('admin/links');
    $menulist = '';
    while($func=$linksdir->read()) {
      if(substr($func, 0, 6) == 'links.') {
         if ('God'!==$row['name'] && substr($func, 6, 10) == 'editadmins') continue;
        $menulist .= "$func ";
      }
    }
    closedir($linksdir->handle);
    $menulist = explode(' ', $menulist);
    sort($menulist);
    for ($i=0; $i < sizeof($menulist); $i++) {
      if(!empty($menulist[$i])) {
        $sucounter = 0;
        include_once($linksdir->path."/$menulist[$i]");
      }
    }
    adminmenu($admin_file.'.php?op=logout',_ADMINLOGOUT, 'logout.gif');
    if ($counter==0) echo '<td></td>';  //Added by Raven 7/1/2007 to fix a warning in xhtml
    echo'</tr></table>';
    $counter = '';
   //End DIV
  echo '</div>';
  }
    //begins div and checks if $radmin_suepr
  if ($radminsuper == 0) {
  echo '<div class="dhtmlgoodies_aTab">';
  echo 'You cannot view this page</div>';
  }
  echo '<div class="dhtmlgoodies_aTab">';
  echo '<img src="/images/dhtmlgoodies_logo1.gif" style="float:left;margin-right:5px;margin-bottom:5px">';
  echo '<center><a href="'.$admin_file.'.php"><font class="title">'._MODULESADMIN.'</font></a>';
  echo '<br /><br />';
  echo'<table border="0" width="100%" cellspacing="1"><tr>';
  $result = $db->sql_query('SELECT title, admins FROM '.$prefix.'_modules ORDER BY title ASC');
  $row2 = $db->sql_fetchrow($db->sql_query('SELECT name FROM '.$prefix.'_authors WHERE aid=\''.$aid.'\''));
  while ($row = $db->sql_fetchrow($result)) {
    $admins = explode(',', $row['admins']);
    $auth_user = 0;
    for ($i=0; $i < sizeof($admins); $i++) {
      if ($row2['name'] == $admins[$i]) {
        $auth_user = 1;
      }
    }
    if ($radminsuper == 1 OR $auth_user == 1) {
      if (file_exists('modules/'.$row['title'].'/admin/index.php') AND file_exists('modules/'.$row['title'].'/admin/links.php') AND file_exists('modules/'.$row['title'].'/admin/case.php')) {
        include_once('modules/'.$row['title'].'/admin/links.php');
      }
    }
  }
  adminmenu($admin_file.'.php?op=logout', _ADMINLOGOUT, 'logout.gif');
  if ($counter==0) echo '<td></td>';  //Added by Raven 7/1/2007 to fix a warning in xhtml
  echo'</tr></table></center>';
    echo '</div></div>';

echo '<script type="text/javascript">';
echo "initTabs('dhtmlgoodies_tabView1',Array('"._ADMINMENU."','"._MODULESADMIN."'),0,800,'',Array(true,true));";
echo '</script>';
  CloseTable();
  echo '<br />';
}

in themes/Your_Theme/
Code:
/* For Admin Pannel */
   .dhtmlgoodies_tabPane{
      height:21px;   /* Height of tabs */
      border-bottom:1px solid #919b9c;
   }
   .dhtmlgoodies_aTab{
      border-left:0px solid #919b9c;
      border-right:0px solid #919b9c;
      border-bottom:0px solid #919b9c;
      font-family: Trebuchet MS, Lucida Sans Unicode, Arial, sans-serif;
      padding:5px;      
      
   }
   .dhtmlgoodies_tabPane DIV{
      float:left;
      height:100%;   /* Height of tabs */
      padding-left:3px;
      vertical-align:middle;
      background-repeat:no-repeat;
      background-position:bottom left;
      cursor:pointer;
      position:relative;
      bottom:-1px;
      margin-left:0px;
      margin-right:0px;
   }
   .dhtmlgoodies_tabPane .tabActive{
      background-image:url('../images/tab_left_active.gif');
      margin-left:0px;
      margin-right:0px;   
      z-index:10;   
   }
   .dhtmlgoodies_tabPane .tabInactive{
      background-image:url('../images/tab_left_inactive.gif');
      margin-left:0px;
      margin-right:0px;
      z-index:1;
   }

   .dhtmlgoodies_tabPane .inactiveTabOver{
      background-image:url('../images/tab_left_over.gif');
      margin-left:0px;
      margin-right:0px;
   }
   .dhtmlgoodies_tabPane span{
      font-family:arial;
      vertical-align:top;
      font-size:11px;
      padding-left:3px;
      padding-right:3px;      
      line-height:21px;
      float:left;
   }
   .dhtmlgoodies_tabPane .tabActive span{
      padding-bottom:1px;
      line-height:20px;
   }
   
   .dhtmlgoodies_tabPane img{
      float:left;
   }


in includes/javascript.php

Code:
if(defined('ADMIN_FILE')){
   //echo "<link rel=\"stylesheet\" href=\"css/tab-view.css\" type=\"text/css\" media=\"screen\">";
   echo "<script type=\"text/javascript\" src=\"includes/ajax.js\"></script>";
   echo "<script type=\"text/javascript\" src=\"includes/tab-view.js\">";
    /************************************************************************************************************
   (C)
Only registered users can see links on this board!
Get registered or login to the forums!
October 2005
   
   This is a script from
Only registered users can see links on this board!
Get registered or login to the forums!
You will find this and a lot of other scripts at our website.   
   
   Terms of use:
   You are free to use this script as long as the copyright message is kept intact. However, you may not
   redistribute, sell or repost it without our permission.
   
   Updated:
      
      March, 14th, 2006 - Create new tabs dynamically
   
   Thank you!
   
   www.dhtmlgoodies.com
   Alf Magne Kalleland
   
   ************************************************************************************************************/      
   echo"</script>\n\n";
   }


I suggest you download the zip from their website too , for images
here:
Only registered users can see links on this board!
Get registered or login to the forums!

I will make the script more dynamic when I have time.


Last edited by eldorado on Fri Jun 05, 2009 6:13 pm; edited 2 times in total
View user's profile Send private message Visit poster's website MSN Messenger
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

PostPosted: Wed Jun 03, 2009 8:08 am Reply with quote Back to top

Thanks for the information. However, we have standardized on using jQuery for all our effects like this. It will take some time to convert things but we would recommend that any useful additions that use JavaScript type widgets use jQuery. And it just so happens that there is already a jQuery Tabs Container plug-in Wink -
Only registered users can see links on this board!
Get registered or login to the forums!
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
eldorado
Involved
Involved


Joined: Sep 10, 2008
Posts: 414
Location: France,Translator

PostPosted: Wed Jun 03, 2009 8:09 am Reply with quote Back to top

Thanks for the info about standard. I'll convert it right away for users reading this Very Happy. I see the back button won't break here , cool.

However , I don't see how I can add tabs dynamically to the tab layout. As it was my intention.
View user's profile Send private message Visit poster's website MSN Messenger
Palbin
Site Admin


Joined: Mar 30, 2006
Posts: 2456
Location: Pittsburgh, Pennsylvania

PostPosted: Wed Jun 03, 2009 4:12 pm Reply with quote Back to top

Only registered users can see links on this board!
Get registered or login to the forums!
View user's profile Send private message
eldorado
Involved
Involved


Joined: Sep 10, 2008
Posts: 414
Location: France,Translator

PostPosted: Wed Jun 03, 2009 4:45 pm Reply with quote Back to top

how can I miss something that obvious Sad !
Thanks palbin Wink
View user's profile Send private message Visit poster's website MSN Messenger
Palbin
Site Admin


Joined: Mar 30, 2006
Posts: 2456
Location: Pittsburgh, Pennsylvania

PostPosted: Wed Jun 03, 2009 5:24 pm Reply with quote Back to top

Anytime Smile
View user's profile Send private message
eldorado
Involved
Involved


Joined: Sep 10, 2008
Posts: 414
Location: France,Translator

PostPosted: Fri Jun 05, 2009 6:10 pm Reply with quote Back to top

Ok I've updated the code to jquery; However I was wondering which version of jquery to use?And how you were going to organize the hierarchy between files.
Currently , I have installed these:
root wrote:
includes\jquery\jquery1.3.2.js
includes\jquery\js
includes\jquery\ui
includes\jquery\css
includes\jquery\docs
includes\jquery\external
includes\jquery\themes
includes\jquery\images


The jquery wasn't empty , I assumed the version in the folder was deprecated and I didn't touch it to keep compatibility with other programs.

One possibility however is to refer to an external jquery.js based on the official website and updating our script accordingly.
View user's profile Send private message Visit poster's website MSN Messenger
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

PostPosted: Fri Jun 05, 2009 6:33 pm Reply with quote Back to top

Our structure was created as we were testing jQuery functionality. We will be reorganizing as needed but I can't state anything at this point. As the v2.4 release draws closer we should be able to answer your questions. But, we will be including the latest production release when we do publish the next RN release.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Display posts from previous:       
Post new topic   Reply to topic

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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum