Author |
Message |
Doulos
Life Cycles Becoming CPU Cycles

Joined: Jun 06, 2005
Posts: 732
|
Posted:
Sat Oct 29, 2005 7:36 pm |
|
I installed this block and it works great. I have two questions about modifying it. I am a cut and past/ trial and error code modifier. I don't know php and am only know basic html.
1. how can I change the background/font colors from white to the same color as my theme?
2. how would I go about adding code for non-modules? For example, adding a item to the menu for a link to my photo album.
Thanks |
|
|
|
 |
Raven
Site Admin/Owner

Joined: Aug 27, 2002
Posts: 17088
|
Posted:
Sun Oct 30, 2005 9:22 am |
|
|
|
 |
Doulos

|
Posted:
Mon Oct 31, 2005 12:36 pm |
|
#2 worked for the link. Thanks Raven, don't know why I didn't figure that one out myself. |
|
|
|
 |
Doulos

|
Posted:
Tue Nov 01, 2005 12:02 am |
|
For some reason when I add the link to the the "non-module" page, the block stops being a drop-down menu. Instead it becomes a menu with a slider on the right.
I changed this:Quote: | content .= "<scri pt language=\"JavaScri pt\">function gotoURL(dropDown) { URL=dropDown.options[dropDown.selectedIndex].value; if(URL.length>0) { top.location.href = URL; } } </scri pt>";
$content .= "<SELECT NAME=\"name\" SIZE=\"8\" onChange=\"gotoURL(this)\">";
$content .= "<OPTION VALUE=\"index.php\"><big>·</big> "._HOME."</OPTION>";
$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 .= "<OPTION VALUE=\"modules.php?name=$m_title\"><big>·</big> $m_title2</OPTION>";
|
To this:Quote: | $content .= "<scri pt language=\"JavaScri pt\">function gotoURL(dropDown) { URL=dropDown.options[dropDown.selectedIndex].value; if(URL.length>0) { top.location.href = URL; } } </scri pt>";
$content .= "<SELECT NAME=\"name\" SIZE=\"8\" onChange=\"gotoURL(this)\">";
//----------Here starts the changes----------------------//
$content .= "<OPTION VALUE=\"http://www.doulos-usa.com/home.html\"><big>·</big> "._HOME."</OPTION>";
$content .= "<OPTION VALUE=\"index.php\"><big>·</big> "._COMMUNITY."</OPTION>";
$content .= "<OPTION VALUE=\"http://www.doulos-usa.com/coppermine/index.php\"><big>·</big> "._Photo_Gallery."</OPTION>";
$content .= "<OPTION VALUE=\"brother.html\"><big>·</big> "._Brother."</OPTION>";
//-------------Here end the changes-----------------//
$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 .= "<OPTION VALUE=\"modules.php?name=$m_title\"><big>·</big> $m_title2</OPTION>";
|
Help me if you can, I really like the drop-down menu better. |
|
|
|
 |
Raven

|
Posted:
Tue Nov 01, 2005 1:43 am |
|
That would seem to indicate that you have less than 8 menu items. If that is the case, then modify this line from SIZE=\"8\" to whatever smaller value will display the drop down.
$content .= "<SELECT NAME=\"name\" SIZE=\"8\" onChange=\"gotoURL(this)\">"; |
|
|
|
 |
Doulos

|
Posted:
Tue Nov 01, 2005 1:35 pm |
|
Actually, I have 15 menu items (+5 more visable by admin).
I changed this:
$content .= "<SELECT NAME=\"name\" SIZE=\"8\" onChange=\"gotoURL(this)\">";
to this:
$content .= "<SELECT NAME=\"name\" SIZE=\"1\" onChange=\"gotoURL(this)\">";
and it became a drop-down menu with "Home" as the first choice. This is fine, but I don't understand why "Select" isn't the first choice like it is on Ravens site. |
|
|
|
 |
Raven

|
Posted:
Tue Nov 01, 2005 2:04 pm |
|
I have added that option to mine but it is not in the d/l. Just make an option like this as your first choice:
$content .= "<option>Select</option>";
and then your other changes
$content .= "<OPTION VALUE=\"http://www.doulos-usa.com/home.html\"><big>·</big> "._HOME."</OPTION>";
$content .= "<OPTION VALUE=\"index.php\"><big>·</big> "._COMMUNITY."</OPTION>";
$content .= "<OPTION VALUE=\"http://www.doulos-usa.com/coppermine/index.php\"><big>·</big> "._Photo_Gallery."</OPTION>";
$content .= "<OPTION VALUE=\"brother.html\"><big>·</big> "._Brother."</OPTION>"; |
|
|
|
 |
Doulos

|
Posted:
Tue Nov 01, 2005 6:51 pm |
|
As this is the place where I have received the most help I have added a link to your site on mine. This is the first place I will send anyone with php-nuke questions. Thanks again. |
|
|
|
 |
Raven

|
Posted:
Tue Nov 01, 2005 7:58 pm |
|
|
|
 |
cloud2424
New Member


Joined: Oct 17, 2005
Posts: 6
|
Posted:
Tue Nov 01, 2005 11:04 pm |
|
does this block not work on nuke 7.7 cuz i cant get it to work |
|
|
|
 |
Doulos

|
Posted:
Wed Nov 02, 2005 1:45 pm |
|
Raven wrote: | |
That's the one! |
|
|
|
 |
Doulos

|
Posted:
Wed Nov 02, 2005 1:46 pm |
|
no not that one. I used this one.
But I will add the other one, too. Thanks again.
Note: Cloud, I was warned against using 7.7-7.9 because of bugs and security issues. Don't know if anyone fixed them as yet |
|
|
|
 |
edkiefer
Regular


Joined: Jul 15, 2005
Posts: 50
|
Posted:
Sun Nov 06, 2005 4:30 pm |
|
Ezekiel wrote: | I installed this block and it works great. I have two questions about modifying it. I am a cut and past/ trial and error code modifier. I don't know php and am only know basic html.
1. how can I change the background/font colors from white to the same color as my theme?
2. how would I go about adding code for non-modules? For example, adding a item to the menu for a link to my photo album.
Thanks |
Does anyone know where I can find a expanding menu for phpnuke? Like a tree menu that expands and contracts? |
|
|
|
 |
rose38478
Regular


Joined: Jul 22, 2005
Posts: 78
|
Posted:
Thu Dec 29, 2005 10:21 pm |
|
I have a question on this block. Is there any way for me to tweak it to show non active modules ONLY to admins? Or invisible modules only to admins? I kind of need them and they disappeared when I loaded this block.
Which is LOVE btw. Talk about uncluttering the one side of my page. Awesome!!! |
|
|
|
 |
Raven

|
Posted:
Fri Dec 30, 2005 1:01 am |
|
|
|
 |
rose38478

|
Posted:
Fri Dec 30, 2005 6:53 am |
|
Thanks Raven. I loaded that block, which seems to do what I want it to do....except...all the wording looks like this:
_MO_VISITORS:
_MO_GO this is the Go buttons
_MO_GENERAL
Any ideas on how I get that out of there?
I'm running PHPNuke 7.6 patched with Nuke Sentinel.
Thanks!! |
|
|
|
 |
montego
Site Admin

Joined: Aug 29, 2004
Posts: 9457
Location: Arizona
|
Posted:
Fri Dec 30, 2005 10:50 am |
|
rose38478, I think you may have missed a step in the installation. You should have had to add the language defines to either ./language/lang-english.php or ./admin/language/lang-english.php. |
_________________ Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! |
|
|
 |
rose38478

|
Posted:
Fri Dec 30, 2005 8:43 pm |
|
Yep, I messed that up. I didn't read the directions carefully and jumped ahead. Oops.
But now, here is another problem.
This has three + pull down menus and as long as the module you want is showing, it's fine. But if you need one of the modules from the pull down menu...it doesn't work. Instead of pulling say:
http://www.goldcateyes.com/modules.php?name=Private_Messages
It's pulling:
http://www.goldcateyes.com/Private_Messages
Which of course gets a page not found error. I've looked at the programming, but I can see anything right off the top of my head. I'm not quite that good yet.
I can post the programming if you need it. |
|
|
|
 |
montego

|
Posted:
Sat Dec 31, 2005 8:10 am |
|
rose38478, If you are using Bob's block (which is what Raven pointed you to), I am only familiar with it having two drop-down list boxes. I would check to see if any of the SELECT statements (in the code) have the value hard-coded as "Private_Messages".
Sounds like what you have has come from a GoogleTap'd site, but someone hard-coded the block. If you can't find it, please post the code. |
|
|
|
 |
rose38478

|
Posted:
Sat Dec 31, 2005 7:03 pm |
|
It's Bob's block. I used the one that Raven said to use.
I've got three drop down boxes. I've got All Users, Members Only and Inactive.
I'll look at that scripting, but it's not just private messages that it's doing it to. It's everything in the drop down box that is not just right on top. |
|
|
|
 |
montego

|
Posted:
Sat Dec 31, 2005 7:59 pm |
|
rose38478, OH, my appologies. I should have read the thread more carefully. I am using only the Admin block of Bob's. Sounds like you are using his NSN Modules Universal? Is this correct? Also, are you using some form of GoogleTap? I downloaded it and briefly looked at the code, but cannot see any hard-coding...
sorry, need to get back to my New Years party... Will take a closer look tomorrow. |
|
|
|
 |
|