You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 44 guest(s) and 0 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - module development [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
Nemesis
Corporal
Corporal


Joined: Apr 06, 2003
Posts: 65


PostPosted: Wed Apr 23, 2003 12:54 pm Reply with quoteBack to top

i am trying to make a module which will list members of my gaming group and also give them option of selecting icons for games they play on server. the problem i run into is i am calling the image from the database to the list page incorrectly. any input would be greatly appreciated

i use this code for each select box in profile (with differnt names )
Code:
<?php echo _CLSC; ?>:
<?php
if ( $cl[m_sc] != "" ) {
    $m_sc = $cl['m_sc'];
} else {
    $m_sc = "blank.gif";
}
?>
<select name="m_sc">
      <option value="" <?php echo (empty($cl['m_sc'])) ? 'selected' :
''; ?>></option>
      <option value="Star" <?php echo ($cl['m_sc'] ==
"images/icons/star.gif") ?
'selected' : ''; ?>>Star</option>
</select>


and i use this to call the image to the list page
Code:
echo "<td bgcolor=\"$dcolor\" align=\"left\"><img src=\"modules/$module_name/images/icons/$m_sc\" width=\"25\" height=\"15\" align=\"right\" border=\"0\">\n";


but i get a broken image with:
http://myurl/modules/modulename/images/icons/

the path is correct but the image itself isnt being called . Any ideas or input be great . this newb needs all the help he can get
Find all posts by NemesisView user's profileSend private messageVisit poster's websiteAIM Address
Raven
General
General


Joined: Mar 22, 2003
Posts: 5233

Location: USA

PostPosted: Wed Apr 23, 2003 2:47 pm Reply with quoteBack to top

Why do you have tick marks around this? $m_sc = $cl['m_sc']; but not this $cl[m_sc] ? Could be your problem.

_________________
Those who hear not the music think the dancers mad.
Raven Web Hosting|My Scripts & Stuff
Find all posts by RavenView user's profileSend private messageVisit poster's website
Nemesis
Corporal
Corporal


Joined: Apr 06, 2003
Posts: 65


PostPosted: Wed Apr 23, 2003 2:50 pm Reply with quoteBack to top

i was told by someone at php it was proper orginially i didnt have the tic marks

origianl was
Code:

if ( $cl[m_sc] != "" ) {
    $m_sc = $cl[m_sc];


i was told this is incorrect nad listened. i am new to php . is this the problem?
Find all posts by NemesisView user's profileSend private messageVisit poster's websiteAIM Address
Raven
General
General


Joined: Mar 22, 2003
Posts: 5233

Location: USA

PostPosted: Wed Apr 23, 2003 2:52 pm Reply with quoteBack to top

Well without the tic marks it will substitute the value of m_sc. With the tick marks it substitues m_sc. Since it's an array, then chances are you want an array element, which means you do NOT want the tick marks.

_________________
Those who hear not the music think the dancers mad.
Raven Web Hosting|My Scripts & Stuff
Find all posts by RavenView user's profileSend private messageVisit poster's website
Nemesis
Corporal
Corporal


Joined: Apr 06, 2003
Posts: 65


PostPosted: Wed Apr 23, 2003 2:53 pm Reply with quoteBack to top

thank you ill give it a wirl. this little addon is kicking my butt hehe i jsut get the pathway with no call for image
Find all posts by NemesisView user's profileSend private messageVisit poster's websiteAIM Address
Raven
General
General


Joined: Mar 22, 2003
Posts: 5233

Location: USA

PostPosted: Wed Apr 23, 2003 3:11 pm Reply with quoteBack to top

Well, I don't know if the module works, but your problem would be in that area because the syntax isn't right. Let me know.

_________________
Those who hear not the music think the dancers mad.
Raven Web Hosting|My Scripts & Stuff
Find all posts by RavenView user's profileSend private messageVisit poster's website
Nemesis
Corporal
Corporal


Joined: Apr 06, 2003
Posts: 65


PostPosted: Wed Apr 23, 2003 3:12 pm Reply with quoteBack to top

tried it , the module actually works , its just the images broken on this one area i want them . i dont get it pathway ther something in my $m_sc isnt callnig the image correctly

i had the call for the select drops in edit area. and the call to show images in the list . it isnt major coding . but damn if i can get it right
Find all posts by NemesisView user's profileSend private messageVisit poster's websiteAIM Address
Raven
General
General


Joined: Mar 22, 2003
Posts: 5233

Location: USA

PostPosted: Wed Apr 23, 2003 3:17 pm Reply with quoteBack to top

In this piece of code
Code:
if ( $cl[m_sc] != "" ) {
    $m_sc = $cl['m_sc'];
} else {
    $m_sc = "blank.gif";
}

Add a debug statement like this:
Code:
if ( $cl[m_sc] != "" ) {
    $m_sc = $cl[m_sc];
} else {
    $m_sc = "blank.gif";
}
echo $m_sc;die();

If $m_sc is empty, that's your problem. Then you have to figure out why.

_________________
Those who hear not the music think the dancers mad.
Raven Web Hosting|My Scripts & Stuff
Find all posts by RavenView user's profileSend private messageVisit poster's website
Nemesis
Corporal
Corporal


Joined: Apr 06, 2003
Posts: 65


PostPosted: Wed Apr 23, 2003 3:18 pm Reply with quoteBack to top

hehe wow kewl thanks didnt know that little tid bit hehe. i did say i was newb . btw rate where gonig thsi should be an pm ROFL

hmmmmmmmm i did it and got CLSC: blank.gif instead of my normal drop menu
Find all posts by NemesisView user's profileSend private messageVisit poster's websiteAIM Address
Raven
General
General


Joined: Mar 22, 2003
Posts: 5233

Location: USA

PostPosted: Wed Apr 23, 2003 3:53 pm Reply with quoteBack to top

Well, happy debugging Wink

_________________
Those who hear not the music think the dancers mad.
Raven Web Hosting|My Scripts & Stuff
Find all posts by RavenView user's profileSend private messageVisit poster's website
Nemesis
Corporal
Corporal


Joined: Apr 06, 2003
Posts: 65


PostPosted: Wed Apr 23, 2003 3:54 pm Reply with quoteBack to top

was it suppsoed to do that? it liked killed al lmy code following and showed me the default blank.gif which is supposed to be if they didnt choose the image
Find all posts by NemesisView user's profileSend private messageVisit poster's websiteAIM Address
Raven
General
General


Joined: Mar 22, 2003
Posts: 5233

Location: USA

PostPosted: Wed Apr 23, 2003 4:00 pm Reply with quoteBack to top

The die(); kills it to allow you to see the value to determine if that is what you were expecting. Now, remove that code and correct this. I just noticed this:

$cl[m_sc] should probably be $cl[$m_sc].

_________________
Those who hear not the music think the dancers mad.
Raven Web Hosting|My Scripts & Stuff
Find all posts by RavenView user's profileSend private messageVisit poster's website
Nemesis
Corporal
Corporal


Joined: Apr 06, 2003
Posts: 65


PostPosted: Wed Apr 23, 2003 4:10 pm Reply with quoteBack to top

thank you very much for all your time. i think maybe i over stepped myself
Find all posts by NemesisView user's profileSend private messageVisit poster's websiteAIM Address
Raven
General
General


Joined: Mar 22, 2003
Posts: 5233

Location: USA

PostPosted: Wed Apr 23, 2003 4:19 pm Reply with quoteBack to top

As a very wise man once said: We learn by doing (James T. Kirk)

Damn it Jim, I'm a programmer, not a magician! Laughing (paraphrase of Bones)

_________________
Those who hear not the music think the dancers mad.
Raven Web Hosting|My Scripts & Stuff
Find all posts by RavenView user's profileSend private messageVisit poster's website
Nemesis
Corporal
Corporal


Joined: Apr 06, 2003
Posts: 65


PostPosted: Wed Apr 23, 2003 4:27 pm Reply with quoteBack to top

i liked scotie much better " im given all shes got captain ........she cant take much more of this" hehehe

hehe nah thinknig mabye i should eigher scrap and total redo this part of module or try something simpler for my first time
Find all posts by NemesisView user's profileSend private messageVisit poster's websiteAIM Address
Display posts from previous:      
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next 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



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by · TOGETHER TEAM srl ITALY http://www.togetherteam.it · DONDELEO E-COMMERCE http://www.DonDeLeo.com
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.244 Seconds - 281 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::