Helli Telli Help with GTNextGen on PHPNuke 7.6

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   Helli Telli Help with GTNextGen on PHPNuke 7.6
xtrax1
CZ Active Member
 Codezwiz Site Donator
xtrax1 has been a member for over 19 year's 19 Year Member
Gender: Male
Status: Offline
Joined: Feb 18, 2005
0.02 posts per day
Posts: 107
Points: 3,824
   
Hello Telli,

We have a new website thats using phpnuke 7.6 patched and installed GT-NextGen GoogleTap however we are having an issue with the following file edits....

admin/modules/modules.php

It says to make the following edits...in modules.php

*Manual Instruction for admin/modules/modules.php:
Find:
   sql_query("insert into ".$prefix."_modules values (NULL, '$modlist[$i]', '$modlist[$i]', '0', '0', '1')", $dbi);
Replace With:
   sql_query("insert into ".$prefix."_modules values (NULL, '$modlist[$i]', '$modlist[$i]', '0', '0', '1', NULL)", $dbi);


However in 7.6 its a little bit different... ours shows this

      $db->sql_query("insert into ".$prefix."_modules values (NULL, '$modlist[$i]', '$modlist[$i]', '0', '0', '1', '0', '')");


We've made the edits were we can manually change the url in the modules.php file however the modules not showing the modules titles etc in the modules block...

I have attached the modules.php file if you woudnt mind taking a look to see whats wrong...

And here is the instructions just for and outlook of what we have changed already in the modules.php file


Admin Modules Tweak for Default Nuke Main Menu

------------------------------------------------------
# For those that are hellbent on using the default menu
that comes with PHP-Nuke. Just do the following to make
block-modules.php work with PHP-NUKE. #

# Please note if you already use a main menu which is
manually edited, this tweak serves no purpose for you,
this tweak was specifically designed for those who use
the default menu (block-Modules.php) with PHP-NUKE. #
------------------------------------------------------

The first step is to manually add a row to the end of the
nuke_modules table. We will create an entry for url,
which we will later use to input the preferred GT url of your module.
(i.e Topics modules preferred GT url would be topics.html)

OK, lets start by opening up what you edit your nuke database with,
most people use phpmyadmin, just open up your database and go into your
nuke_modules table.

Add a row at the end with the following characteristics
Field/name: url
Type: varchar
Length: 255
Null: null
Default: NULL

You are done playing with the database now!

Next, We will make a few changes to the admin/modules/modules.php file.
You can either edit the file manually with the instruction *below or overwrite your existing file
with the one provided in the GT-NExtGEn beta distribution.
It is strongly preferred you make a backup of your current file before overwriting
or editing.
Lets Edit!

*Manual Instruction for admin/modules/modules.php:
Find:
   sql_query("insert into ".$prefix."_modules values (NULL, '$modlist[$i]', '$modlist[$i]', '0', '0', '1')", $dbi);
Replace With:
   sql_query("insert into ".$prefix."_modules values (NULL, '$modlist[$i]', '$modlist[$i]', '0', '0', '1', NULL)", $dbi);

Find:
function module_edit($mid) {
    global $prefix, $dbi;
    $main_m = sql_query("select main_module from ".$prefix."_main", $dbi);
    list($main_module) = sql_fetch_row($main_m, $dbi);
    $result = sql_query("select title, custom_title, view, inmenu from ".$prefix."_modules where mid='$mid'", $dbi);
    list($title, $custom_title, $view, $inmenu) = sql_fetch_row($result, $dbi);

Replace With:
function module_edit($mid) {
    global $prefix, $dbi;
    $main_m = sql_query("select main_module from ".$prefix."_main", $dbi);
    list($main_module) = sql_fetch_row($main_m, $dbi);
    $result = sql_query("select title, custom_title, view, inmenu, url from ".$prefix."_modules where mid='$mid'", $dbi);
    list($title, $custom_title, $view, $inmenu, $url) = sql_fetch_row($result, $dbi);

Find:
   .""._CUSTOMMODNAME."</td><td>"
   ."<input type=\"text\" name=\"custom_title\" value=\"$custom_title\" size=\"50\"></td></tr>";

Replace With:
   .""._CUSTOMMODNAME."</td><td>"
   ."<input type=\"text\" name=\"custom_title\" value=\"$custom_title\" size=\"50\"></td></tr>"
        ."<tr><td>Preferred URL for GoogleTap:</td><td>"
        ."<input type=\"text\" name=\"url\" value=\"$url\" size=\"50\"></td></tr>";

Find:
function module_edit_save($mid, $custom_title, $view, $inmenu) {

Replace With:
function module_edit_save($mid, $custom_title, $view, $inmenu, $url) {

Find:
    case "module_edit_save":
    module_edit_save($mid, $custom_title, $view, $inmenu);
    break;

Replace With:
    case "module_edit_save":
    module_edit_save($mid, $custom_title, $view, $inmenu, $url);
    break;

You have completed editing the file, you are already halfway done!

Next we want to upload the block-GT_Modules.php block provided with the GT-NExtGEn beta distribution.

Be sure to add this block in your blocksadmin and activate it. You will notice this block looks identical to the default
block-Modules.php, the only big difference is it only utilizes the url tweak we did above and displays the .html url of the module if we have defined it in for the module.

Which brings us to our next step. Go to your modules administration (where you activate and deactivate modules)
click to edit any module you have in your list (**See below for Core Modules). In your edit screen for the module you selected you should now see the text box for entering your preferred GoogleTap URL. Just enter your .html equivalent URL for the module and click save. When the page reloads, your menu will now display your new URL.

**The core modules already have .html equivalent URL's which exist, please use these URL's in your modules administration:
AvantGo Module = avantgo.html
Content Module = content.html
Downloads Module = downloads.html
Encyclopedia Module = encyclopedia.html
Feedback Module = feedback.html
FAQ Module = faq.html
Forums Module = forums.html
Journal Module = journal.html
Members_List Module = members.html
Private_Messages Module = messages.html
Recommend_Us Module = recommend.html
Reviews Module = reviews.html
Search Module = search.html
Sections Module = sections.html
Statistics Module = stats.html
Stories_Archive Module = archive.html
Surveys Module = surveys.html
Submit_News Module = submit.html
Topics Module = topics.html
Top Module = top.html
Web_Links Module = links.html
WebMail Module = webmail.html
Your_Account Module = account.html

The one last thing is to ensure that your modules entries have rewrite entries in your .htaccess file. You do no have to worry about the modules listed **above. They have already been done for you.

An entry will look something like
RewriteRule ^content.html modules.php?name=Content

The "content.html" part is the URL that we want displayed by GoogleTap. (It is also the preferred GoogleTap URL we entered in our modules administration)
The "modules.php?name=Content" part is the URL that is executed when we click on "content.html"

Just use this template to add your module entries:

Using the url you entered in modules administration, replace where it says (Your URL Name Here) with your url,
Using the module name it goes to in your modules folder, replace where it says (Your Module Name Here) with your module name. Be sure to type your module and url case sensitive (If it is the "News" module then put "News" not "news")
RewriteRule ^(Your URL Name Here).html modules.php?name=(Your Module Name Here)

Ok, once you have added all of your custom modules. You can save and upload the .htaccess file.

You have completed the admin modules tweak for the automatic mainmenu. Congratulations.

----------------------------------------------------
# DONE! #
----------------------------------------------------

the only added item is url for the GT-NextGen....

I await your reply,

Xtrax1


Attached Files
modules.zip (2.87 KB, Downloaded: 1 Time(s))


Back to top Reply with quote
#2   re: Helli Telli Help with GTNextGen on PHPNuke 7.6
xtrax1
CZ Active Member
 Codezwiz Site Donator
xtrax1 has been a member for over 19 year's 19 Year Member
Gender: Male
Status: Offline
Joined: Feb 18, 2005
0.02 posts per day
Posts: 107
Points: 3,824
   
Never mind telli I figured it out ... its working now.. sorry for bothering you!

xtrax1



Back to top Reply with quote
#3   
Telli
Site Admin
Telli has been a member for over 20 year's 20 Year Member
Occupation: Self Employed
Age: 45
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
   
Glad to see you got it worked out. icon_biggrin.gif




_________________
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
#4   re: Helli Telli Help with GTNextGen on PHPNuke 7.6
xtrax1
CZ Active Member
 Codezwiz Site Donator
xtrax1 has been a member for over 19 year's 19 Year Member
Gender: Male
Status: Offline
Joined: Feb 18, 2005
0.02 posts per day
Posts: 107
Points: 3,824
   
Actually telli, I think i gooofed it up even more.... now my modules I have installed that usually show up in the sub menu of the admin panel under modules in phpnuke 7.6 are not showing.... icon_sad.gif

I was wondering if you can take a look at the admin/modules.php file and I will upload the GT-NextGen we are using as well to this post and see if you wouldnt mind takeing a looksie ...see if you can figure it out as the SQL query is different from previous versions of nuke.

The only thing I need is the admin_modules_edit all the rest is working fine...its the only thing stopping us from advancing forward with the rest of the site.... icon_neutral.gif



Attached Files
modules.zip (3.1 KB, Downloaded: 1 Time(s))
Attached Files
GT-NExtGeN_Beta_0.4.zip (70.88 KB, Downloaded: 0 Time(s))


Back to top Reply with quote
#5   
Telli
Site Admin
Telli has been a member for over 20 year's 20 Year Member
Occupation: Self Employed
Age: 45
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
   
Attach a copy of your nuke_modules database table also.




_________________
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
#6   re: Helli Telli Help with GTNextGen on PHPNuke 7.6
xtrax1
CZ Active Member
 Codezwiz Site Donator
xtrax1 has been a member for over 19 year's 19 Year Member
Gender: Male
Status: Offline
Joined: Feb 18, 2005
0.02 posts per day
Posts: 107
Points: 3,824
   
Sure thing telli , I appreciate your help...as you can tell by the sql table I already added the url field

icon_biggrin.gif



Attached Files
nuke-modules-sql.zip (377 Bytes, Downloaded: 3 Time(s))


Back to top Reply with quote
#7   
Telli
Site Admin
Telli has been a member for over 20 year's 20 Year Member
Occupation: Self Employed
Age: 45
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
   
So whats not working? Looks fine here. Are you saying you want the URL added to the edit module screen?




_________________
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
#8   re: Helli Telli Help with GTNextGen on PHPNuke 7.6
xtrax1
CZ Active Member
 Codezwiz Site Donator
xtrax1 has been a member for over 19 year's 19 Year Member
Gender: Male
Status: Offline
Joined: Feb 18, 2005
0.02 posts per day
Posts: 107
Points: 3,824
   
Hello Telli,

We made all the edits to the original modules.php file but then the sub menu that shows modules admin in phpnuke 7.6 dont show... they disappear... IN phpnuke 7.6 the admin file is in the module its self...

However when we make those edits to the modules.php file everthing seems to look fine and the url field shows under edit its just those modules we can no longer administrate as the links disappear...

Here is a screen cap of whats happening in the admin panel of nuke 7.6


xtrax



Attached Files
modules.zip (18.89 KB, Downloaded: 1 Time(s))


Back to top Reply with quote
#9   
Telli
Site Admin
Telli has been a member for over 20 year's 20 Year Member
Occupation: Self Employed
Age: 45
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
   
Thats a problem with the admin menu not CZM. If you look above you can see the link to edit the "Modules". If I had to guess, it is a problem with one of the modules link files.




_________________
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
#10   re: Helli Telli Help with GTNextGen on PHPNuke 7.6
xtrax1
CZ Active Member
 Codezwiz Site Donator
xtrax1 has been a member for over 19 year's 19 Year Member
Gender: Male
Status: Offline
Joined: Feb 18, 2005
0.02 posts per day
Posts: 107
Points: 3,824
   
Hello Telli,

I think the problem is here them in the admin.php file.... for the GraphicsAdmin

You can see it looks in the modules/folder to see if there is an admin file and files for links.php and case.php see it here


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 radminsuper FROM ".$prefix."_authors WHERE aid='$aid'"));
    $radminsuper = intval($row['radminsuper']);
   if ($radminsuper == 1) {
       OpenTable();
       echo "<center><a href=\"".$admin_file.".php\"><font class='title'>"._ADMINMENU."</font></a>";
       echo "<br /><br />";
       echo"<table border=\"0\" width=\"100%\" cellspacing=\"1\"><tr>";
       $linksdir = dir("admin/links");
       while($func=$linksdir->read()) {
           if(substr($func, 0, 6) == "links.") {
              $menulist .= "$func ";
         }
       }
       closedir($linksdir->handle);
       $menulist = explode(" ", $menulist);
       sort($menulist);
       for ($i=0; $i < sizeof($menulist); $i++) {
         if($menulist[$i]!="") {
             $sucounter = 0;
             include($linksdir->path."/$menulist[$i]");
         }
       }
       adminmenu("".$admin_file.".php?op=logout", ""._ADMINLOGOUT."", "logout.gif");
      echo"</tr></table></center>";
      $counter = "";
       CloseTable();
       echo "<br />";
   }
    OpenTable();
    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>";
    $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] != "") {
          $row = $db->sql_fetchrow($db->sql_query("SELECT mid from " . $prefix . "_modules where title='$modlist[$i]'"));
          $mid = intval($row['mid']);
          if ($mid == "") {
            $db->sql_query("insert into " . $prefix . "_modules values (NULL, '$modlist[$i]', '$modlist[$i]', '0', '0', '1', '0', '')");
          }
      }
    }
   $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 || $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("modules/$row[title]/admin/links.php");
         }
      }
   }
    adminmenu("".$admin_file.".php?op=logout", ""._ADMINLOGOUT."", "logout.gif");
    echo"</tr></table></center>";
    CloseTable();
    echo "<br />";
}



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