Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Blocks
Author Message
Doulos
Life Cycles Becoming CPU Cycles



Joined: Jun 06, 2005
Posts: 732

PostPosted: Sat Oct 29, 2005 7:36 pm Reply with quote

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
 
View user's profile Send private message
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Sun Oct 30, 2005 9:22 am Reply with quote

#1 - Right off the top of my head, I would suggest try using a style="background-color:COLOR;" property in the <select> tag

#2 - [ Only registered users can see links on this board! Get registered or login! ]
 
View user's profile Send private message
Doulos







PostPosted: Mon Oct 31, 2005 12:36 pm Reply with quote

#2 worked for the link. Thanks Raven, don't know why I didn't figure that one out myself.
 
Doulos







PostPosted: Tue Nov 01, 2005 12:02 am Reply with quote

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>&middot;</big>&nbsp;"._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>&middot;</big>&nbsp;$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>&middot;</big>&nbsp;"._HOME."</OPTION>";
$content .= "<OPTION VALUE=\"index.php\"><big>&middot;</big>&nbsp;"._COMMUNITY."</OPTION>";
$content .= "<OPTION VALUE=\"http://www.doulos-usa.com/coppermine/index.php\"><big>&middot;</big>&nbsp;"._Photo_Gallery."</OPTION>";
$content .= "<OPTION VALUE=\"brother.html\"><big>&middot;</big>&nbsp;"._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>&middot;</big>&nbsp;$m_title2</OPTION>";


Help me if you can, I really like the drop-down menu better.
 
Raven







PostPosted: Tue Nov 01, 2005 1:43 am Reply with quote

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







PostPosted: Tue Nov 01, 2005 1:35 pm Reply with quote

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







PostPosted: Tue Nov 01, 2005 2:04 pm Reply with quote

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>&middot;</big>&nbsp;"._HOME."</OPTION>";
$content .= "<OPTION VALUE=\"index.php\"><big>&middot;</big>&nbsp;"._COMMUNITY."</OPTION>";
$content .= "<OPTION VALUE=\"http://www.doulos-usa.com/coppermine/index.php\"><big>&middot;</big>&nbsp;"._Photo_Gallery."</OPTION>";
$content .= "<OPTION VALUE=\"brother.html\"><big>&middot;</big>&nbsp;"._Brother."</OPTION>";
 
Doulos







PostPosted: Tue Nov 01, 2005 6:51 pm Reply with quote

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







PostPosted: Tue Nov 01, 2005 7:58 pm Reply with quote

RavensScripts
 
cloud2424
New Member
New Member



Joined: Oct 17, 2005
Posts: 6

PostPosted: Tue Nov 01, 2005 11:04 pm Reply with quote

does this block not work on nuke 7.7 cuz i cant get it to work
 
View user's profile Send private message
Doulos







PostPosted: Wed Nov 02, 2005 1:45 pm Reply with quote

Raven wrote:
RavensScripts


That's the one!
 
Doulos







PostPosted: Wed Nov 02, 2005 1:46 pm Reply with quote

no not that one. I used this one.

Image 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
Regular



Joined: Jul 15, 2005
Posts: 50

PostPosted: Sun Nov 06, 2005 4:30 pm Reply with quote

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?
 
View user's profile Send private message
rose38478
Regular
Regular



Joined: Jul 22, 2005
Posts: 78

PostPosted: Thu Dec 29, 2005 10:21 pm Reply with quote

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!!!
 
View user's profile Send private message
Raven







PostPosted: Fri Dec 30, 2005 1:01 am Reply with quote

Try one of Bob's at [ Only registered users can see links on this board! Get registered or login! ] . Mine is a hybrid Smile
 
rose38478







PostPosted: Fri Dec 30, 2005 6:53 am Reply with quote

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

PostPosted: Fri Dec 30, 2005 10:50 am Reply with quote

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.

_________________
Where Do YOU Stand?
HTML Newsletter::ShortLinks::Mailer::Downloads and more... 
View user's profile Send private message Visit poster's website
rose38478







PostPosted: Fri Dec 30, 2005 8:43 pm Reply with quote

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:
[ Only registered users can see links on this board! Get registered or login! ]

It's pulling:
[ Only registered users can see links on this board! Get registered or login! ]

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. Sad

I can post the programming if you need it.
 
montego







PostPosted: Sat Dec 31, 2005 8:10 am Reply with quote

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







PostPosted: Sat Dec 31, 2005 7:03 pm Reply with quote

It's Bob's block. I used the one that Raven said to use. Smile

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







PostPosted: Sat Dec 31, 2005 7:59 pm Reply with quote

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... Laughing Will take a closer look tomorrow.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Blocks

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 ©