XML button in modulles, how do i acieve this?

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   XML button in modulles, how do i acieve this?
necrosblade
CZ Newbie
necrosblade has been a member for over 18 year's 18 Year Member
Gender: Male
Status: Offline
Joined: Oct 03, 2005
0.00 posts per day
Posts: 8
Points: 459
   
Just wondering if anyone knows how to add the XML button in the modules, next to the module name. Ive searched sooooooo many forums over about a weeks time for the answer to this, my eyes are bleeding, lol. I have an XML/RSS script that reads the last 20 posts in my sites forums, but just cant seem to figure out how to get that little button.

Any help would be appreciated.

Blade



Back to top Reply with quote
#2   
Telli
Site Admin
Telli has been a member for over 20 year's 20 Year Member
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.06 posts per day
Posts: 8089
Points: 494,430
   
Are you refering to the menu block and adding it next to it in there? If so paste that menu block here will see what I can do.




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#3   re: XML button in modulles, how do i acieve this?
necrosblade
CZ Newbie
necrosblade has been a member for over 18 year's 18 Year Member
Gender: Male
Status: Offline
Joined: Oct 03, 2005
0.00 posts per day
Posts: 8
Points: 459
   
I would like to add the "XML Button/image" in this block, so that it sits beside "Forums"


<?php

/************************************************************************/
/* PHP-NUKE: Web Portal System                                          */
/* ===========================                                          */
/*                                                                      */
/* Copyright (c) 2002 by Francisco Burzi                                */
/* http://phpnuke.org                                                   */
/*                                                                      */
/* 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 (eregi("block-Modules.php", $_SERVER['PHP_SELF'])) {
    Header("Location: index.html");
    die();
}

global $prefix, $db, $admin;

    $ThemeSel = get_theme();
    if (file_exists("themes/$ThemeSel/module.php")) {
   include("themes/$ThemeSel/module.php");
   if (is_active("$default_module") AND file_exists("modules/$default_module/index.php")) {
       $def_module = $default_module;
   } else {
       $def_module = "";
   }
    }

    $sql = "SELECT main_module FROM ".$prefix."_main";
    $result = $db->sql_query($sql);
    $row = $db->sql_fetchrow($result);
    $main_module = $row[main_module];
   
    /* If the module doesn't exist, it will be removed from the database automaticaly */

    $sql = "SELECT title FROM ".$prefix."_modules";
    $result = $db->sql_query($sql);
    while ($row = $db->sql_fetchrow($result)) {
   $title = $row[title];
   $a = 0;
   $handle=opendir('modules');
   while ($file = readdir($handle)) {
           if ($file == $title) {
      $a = 1;
       }
   }
   closedir($handle);
   if ($a == 0) {
       $db->sql_query("DELETE FROM ".$prefix."_modules WHERE title='$title'");
   }
    }

    /* Now we make the Modules block with the correspondent links */

    $content .= "<strong><big>·</big></strong>&nbsp;<a href=\"index.html\">"._HOME."</a><br>\n";
    $sql = "SELECT title, custom_title, view FROM ".$prefix."_modules WHERE active='1' AND title!='$def_module' AND inmenu='1' ORDER BY custom_title ASC";
    $result = $db->sql_query($sql);
    while ($row = $db->sql_fetchrow($result)) {
   $m_title = $row[title];
   $custom_title = $row[custom_title];
   $view = $row[view];
   $m_title2 = ereg_replace("_", " ", $m_title);
   if ($custom_title != "") {
       $m_title2 = $custom_title;
   }
   if ($m_title != $main_module) {
       if ((is_admin($admin) AND $view == 2) OR $view != 2) {
      $content .= "<strong><big>·</big></strong>&nbsp;<a href=\"modules.php?name=$m_title\">$m_title2</a><br>\n";
       }
   }
    }

    /* If you're Admin you and only you can see Inactive modules and test it */
    /* If you copied a new module is the /modules/ directory, it will be added to the database */
   
    if (is_admin($admin)) {
   $handle=opendir('modules');
   while ($file = readdir($handle)) {
       if ( (!ereg("[.]",$file)) ) {
      $modlist .= "$file ";
       }
   }
   closedir($handle);
   $modlist = explode(" ", $modlist);
   sort($modlist);
   for ($i=0; $i < sizeof($modlist); $i++) {
       if($modlist[$i] != "") {
      $sql = "SELECT mid FROM ".$prefix."_modules WHERE title='$modlist[$i]'";
      $result = $db->sql_query($sql);
      $row = $db->sql_fetchrow($result);
      $mid = $row[mid];
      $mod_uname = ereg_replace("_", " ", $modlist[$i]);
      if ($mid == "") {
          $db->sql_query("INSERT INTO ".$prefix."_modules VALUES (NULL, '$modlist[$i]', '$mod_uname', '0', '0', '1', '0')");
      }
       }
   }
   $content .= "<br><center><b>"._INVISIBLEMODULES."</b><br>";
   $content .= "<font class=\"tiny\">"._ACTIVEBUTNOTSEE."</font></center><br>";
   $sql = "SELECT title, custom_title FROM ".$prefix."_modules WHERE active='1' AND inmenu='0' ORDER BY title ASC";
   $result = $db->sql_query($sql);
   while ($row = $db->sql_fetchrow($result)) {
       $mn_title = $row[title];
       $custom_title = $row[custom_title];
       $mn_title2 = ereg_replace("_", " ", $mn_title);
       if ($custom_title != "") {
      $mn_title2 = $custom_title;
       }
       if ($mn_title2 != "") {
      $content .= "<strong><big>·</big></strong>&nbsp;<a href=\"modules.php?name=$mn_title\">$mn_title2</a><br>\n";
      $dummy = 1;
       } else {
      $a = 1;
       }
   }
   if ($a == 1 AND $dummy != 1) {
           $content .= "<strong><big>·</big></strong>&nbsp;<i>"._NONE."</i><br>\n";
   }
   $content .= "<br><center><b>"._NOACTIVEMODULES."</b><br>";
   $content .= "<font class=\"tiny\">"._FORADMINTESTS."</font></center><br>";
   $sql = "SELECT title, custom_title FROM ".$prefix."_modules WHERE active='0' ORDER BY title ASC";
   $result = $db->sql_query($sql);
   while ($row = $db->sql_fetchrow($result)) {
       $mn_title = $row[title];
       $custom_title = $row[custom_title];
       $mn_title2 = ereg_replace("_", " ", $mn_title);
       if ($custom_title != "") {
      $mn_title2 = $custom_title;
       }
       if ($mn_title2 != "") {
      $content .= "<strong><big>·</big></strong>&nbsp;<a href=\"modules.php?name=$mn_title\">$mn_title2</a><br>\n";
      $dummy = 1;
       } else {
      $a = 1;
       }
   }
   if ($a == 1 AND $dummy != 1) {
           $content .= "<strong><big>·</big></strong>&nbsp;<i>"._NONE."</i><br>\n";
   }
    }

?>


Thanks
Blade


Back to top Reply with quote
#4   
Telli
Site Admin
Telli has been a member for over 20 year's 20 Year Member
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.06 posts per day
Posts: 8089
Points: 494,430
   
Try this one:


<?php

/************************************************************************/
/* PHP-NUKE: Web Portal System                                          */
/* ===========================                                          */
/*                                                                      */
/* Copyright (c) 2002 by Francisco Burzi                                */
/* http://phpnuke.org                                                   */
/*                                                                      */
/* 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 (eregi("block-Modules.php", $_SERVER['PHP_SELF'])) {
    Header("Location: index.html");
    die();
}

global $prefix, $db, $admin;

    $ThemeSel = get_theme();
    if (file_exists("themes/$ThemeSel/module.php")) {
   include("themes/$ThemeSel/module.php");
   if (is_active("$default_module") AND file_exists("modules/$default_module/index.php")) {
       $def_module = $default_module;
   } else {
       $def_module = "";
   }
    }

    $sql = "SELECT main_module FROM ".$prefix."_main";
    $result = $db->sql_query($sql);
    $row = $db->sql_fetchrow($result);
    $main_module = $row[main_module];
   
    /* If the module doesn't exist, it will be removed from the database automaticaly */

    $sql = "SELECT title FROM ".$prefix."_modules";
    $result = $db->sql_query($sql);
    while ($row = $db->sql_fetchrow($result)) {
   $title = $row[title];
   $a = 0;
   $handle=opendir('modules');
   while ($file = readdir($handle)) {
           if ($file == $title) {
      $a = 1;
       }
   }
   closedir($handle);
   if ($a == 0) {
       $db->sql_query("DELETE FROM ".$prefix."_modules WHERE title='$title'");
   }
    }

    /* Now we make the Modules block with the correspondent links */

    $content .= "<strong><big>·</big></strong>&nbsp;<a href=\"index.html\">"._HOME."</a><br>\n";
    $sql = "SELECT title, custom_title, view FROM ".$prefix."_modules WHERE active='1' AND title!='$def_module' AND inmenu='1' ORDER BY custom_title ASC";
    $result = $db->sql_query($sql);
    while ($row = $db->sql_fetchrow($result)) {
   $m_title = $row[title];
   $xml_img = "";
   if ($m_title == "Forums") {
       $xml_img = "&nbsp;<a href=\"link_to_your_rss_file.xml\"><img src=\"images/xml.gif\" height=\"50\" width=\"100\" title=\"Forum's RSS Feed\" border=\"0\">\n";
   } 
   $custom_title = $row[custom_title];
   $view = $row[view];
   $m_title2 = ereg_replace("_", " ", $m_title);
   if ($custom_title != "") {
       $m_title2 = $custom_title;
   }
   if ($m_title != $main_module) {
       if ((is_admin($admin) AND $view == 2) OR $view != 2) {
      $content .= "<strong><big>·</big></strong>&nbsp;<a href=\"modules.php?name=$m_title\">$m_title2</a>".$xml_img."<br>\n";
       }
   }
    }

    /* If you're Admin you and only you can see Inactive modules and test it */
    /* If you copied a new module is the /modules/ directory, it will be added to the database */
   
    if (is_admin($admin)) {
   $handle=opendir('modules');
   while ($file = readdir($handle)) {
       if ( (!ereg("[.]",$file)) ) {
      $modlist .= "$file ";
       }
   }
   closedir($handle);
   $modlist = explode(" ", $modlist);
   sort($modlist);
   for ($i=0; $i < sizeof($modlist); $i++) {
       if($modlist[$i] != "") {
      $sql = "SELECT mid FROM ".$prefix."_modules WHERE title='$modlist[$i]'";
      $result = $db->sql_query($sql);
      $row = $db->sql_fetchrow($result);
      $mid = $row[mid];
      $mod_uname = ereg_replace("_", " ", $modlist[$i]);
      if ($mid == "") {
          $db->sql_query("INSERT INTO ".$prefix."_modules VALUES (NULL, '$modlist[$i]', '$mod_uname', '0', '0', '1', '0')");
      }
       }
   }
   $content .= "<br><center><b>"._INVISIBLEMODULES."</b><br>";
   $content .= "<font class=\"tiny\">"._ACTIVEBUTNOTSEE."</font></center><br>";
   $sql = "SELECT title, custom_title FROM ".$prefix."_modules WHERE active='1' AND inmenu='0' ORDER BY title ASC";
   $result = $db->sql_query($sql);
   while ($row = $db->sql_fetchrow($result)) {
       $mn_title = $row[title];
       $custom_title = $row[custom_title];
       $mn_title2 = ereg_replace("_", " ", $mn_title);
       if ($custom_title != "") {
      $mn_title2 = $custom_title;
       }
       if ($mn_title2 != "") {
      $content .= "<strong><big>·</big></strong>&nbsp;<a href=\"modules.php?name=$mn_title\">$mn_title2</a><br>\n";
      $dummy = 1;
       } else {
      $a = 1;
       }
   }
   if ($a == 1 AND $dummy != 1) {
           $content .= "<strong><big>·</big></strong>&nbsp;<i>"._NONE."</i><br>\n";
   }
   $content .= "<br><center><b>"._NOACTIVEMODULES."</b><br>";
   $content .= "<font class=\"tiny\">"._FORADMINTESTS."</font></center><br>";
   $sql = "SELECT title, custom_title FROM ".$prefix."_modules WHERE active='0' ORDER BY title ASC";
   $result = $db->sql_query($sql);
   while ($row = $db->sql_fetchrow($result)) {
       $mn_title = $row[title];
       $custom_title = $row[custom_title];
       $mn_title2 = ereg_replace("_", " ", $mn_title);
       if ($custom_title != "") {
      $mn_title2 = $custom_title;
       }
       if ($mn_title2 != "") {
      $content .= "<strong><big>·</big></strong>&nbsp;<a href=\"modules.php?name=$mn_title\">$mn_title2</a><br>\n";
      $dummy = 1;
       } else {
      $a = 1;
       }
   }
   if ($a == 1 AND $dummy != 1) {
           $content .= "<strong><big>·</big></strong>&nbsp;<i>"._NONE."</i><br>\n";
   }
    }

?>


Just edit this part and add the link and the image name and size:


<a href=\"link_to_your_rss_file.xml\"><img src=\"images/xml.gif\" height=\"50\" width=\"100\" title=\"Forum's RSS Feed\" border=\"0\">




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#5   re: XML button in modulles, how do i acieve this?
necrosblade
CZ Newbie
necrosblade has been a member for over 18 year's 18 Year Member
Gender: Male
Status: Offline
Joined: Oct 03, 2005
0.00 posts per day
Posts: 8
Points: 459
   
Much thanks for the help icon_smile.gif

Worked like a charm.

Blade



Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

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
You cannot attach files in this forum
You cannot download files in this forum