|
Joined: May 2001
Posts: 2,798
Member
|
Member
Joined: May 2001
Posts: 2,798 |
I need some help. I am coding this How would I get this working? [ June 29, 2001 10:07 AM: Message edited by: Tech-Ni-Kal ]
|
|
|
|
Joined: Aug 2000
Posts: 874
Moderator / Developer
|
Moderator / Developer
Joined: Aug 2000
Posts: 874 |
i looked real quick so maybe i missed the reason, but...
} ); <---What Is That Doing There? --> Line 545} else {
|
|
|
|
Joined: May 2001
Posts: 2,798
Member
|
Member
Joined: May 2001
Posts: 2,798 |
-------
[ June 29, 2001 09:57 AM: Message edited by: Tech-Ni-Kal ]
|
|
|
|
Joined: Sep 2000
Posts: 1,304
Addict
|
Addict
Joined: Sep 2000
Posts: 1,304 |
You don't use a ; to close an if statement. Here's an example of a correct coding:
|
|
|
|
Joined: May 2001
Posts: 2,798
Member
|
Member
Joined: May 2001
Posts: 2,798 |
|
|
|
|
Joined: Sep 2000
Posts: 1,304
Addict
|
Addict
Joined: Sep 2000
Posts: 1,304 |
Just look at the last three line...:o
});}
What's a paranthesis is doing there???
|
|
|
|
Joined: Aug 2000
Posts: 874
Moderator / Developer
|
Moderator / Developer
Joined: Aug 2000
Posts: 874 |
ohhhhhh. i get what your trying to do now. its not gonna work like that cause if you look you have ); in a number of places before when you want to end the stuff that gets put in to the scalar $DropOrImage1. now i imagine that you probobly _might_ be able to do it by just "slashing" out the )s exept for the last one... so all parens until the ending one become ")". im not sure if that will work though. why dont you just use an if or something...
|
|
|
|
Joined: May 2001
Posts: 2,798
Member
|
Member
Joined: May 2001
Posts: 2,798 |
jordo I will try what you said. If anyone knows how to re-write it better that would be awesome because I would really like this to work.
|
|
|
|
Joined: May 2001
Posts: 2,798
Member
|
Member
Joined: May 2001
Posts: 2,798 |
Someone please help me rewrite it because what jordo said didnt work. Sorry man. It says it cant find a string terminator after a ).
|
|
|
|
Joined: May 2001
Posts: 2,798
Member
|
Member
Joined: May 2001
Posts: 2,798 |
Notice theres an if statement inside the bigger if statement well the } is to close the smaller if statment and the ); closes the big if statement and the } ends it all.
|
|
|
|
Joined: May 2001
Posts: 2,798
Member
|
Member
Joined: May 2001
Posts: 2,798 |
|
|
|
|
Joined: May 2001
Posts: 2,798
Member
|
Member
Joined: May 2001
Posts: 2,798 |
|
|
|
|
Joined: Jun 2001
Posts: 189
Member
|
Member
Joined: Jun 2001
Posts: 189 |
Unrelated, perhaps...but are you still working on that code to do common CP tasks from the forums for admins?
I have another question regaurding that.
Is it possible to put images in a drop down box?
|
|
|
|
Joined: May 2001
Posts: 2,798
Member
|
Member
Joined: May 2001
Posts: 2,798 |
Yea and it is not possible to have the drop down in the regular board. It will no matter what prompt you to enter your cp info.
I have no clue.
|
|
|
|
Joined: Jun 2001
Posts: 189
Member
|
Member
Joined: Jun 2001
Posts: 189 |
|
|
|
|
Joined: Aug 2000
Posts: 874
Moderator / Developer
|
Moderator / Developer
Joined: Aug 2000
Posts: 874 |
if you can explain to me what exactly you want it to do ill recode it for ya.
|
|
|
|
Joined: May 2001
Posts: 2,798
Member
|
Member
Joined: May 2001
Posts: 2,798 |
Alright.. I want to make it so that for the admin functions on the thread page it would either be a Drop Down Box or Images. I have it already set up in the control panel I just can not get it to work so that if
$CPVariable eq 'yes'
it will show the drop down box
else
it will show images
If you look above I have the coding for the images and drop down box I just need them to work when I put them in an IF statement
|
|
|
|
Joined: May 2001
Posts: 2,798
Member
|
Member
Joined: May 2001
Posts: 2,798 |
Image Coding Drop Down Coding
|
|
|
|
Joined: May 2001
Posts: 2,798
Member
|
Member
Joined: May 2001
Posts: 2,798 |
jordo - have you tried at all?
|
|
|
|
Joined: May 2001
Posts: 2,798
Member
|
Member
Joined: May 2001
Posts: 2,798 |
I was thinking.
What if I put the Image Codes and the Drop Down codes in a
sub ImagesAdminFunc {
and a
sub DropDownAdminFunc {
and the use an if statement and $DisplayFunc = "print DropDownAdminFunc"
I dont know how you would show how to print a sub. Some help on my thoughts! Thanks!
|
|
|
|
Joined: May 2001
Posts: 2,798
Member
|
Member
Joined: May 2001
Posts: 2,798 |
Maybe to show how to print you go ..
&DropDownAdminFunc;
|
|
|
|
Joined: Aug 2000
Posts: 874
Moderator / Developer
|
Moderator / Developer
Joined: Aug 2000
Posts: 874 |
try this. sorry i had forgetten about this thread
|
|
|
|
Joined: May 2001
Posts: 2,798
Member
|
Member
Joined: May 2001
Posts: 2,798 |
Jordo .. what about for the images? Will it be in the same kinda Code as the dropdown box?
|
|
|
|
Joined: May 2001
Posts: 2,798
Member
|
Member
Joined: May 2001
Posts: 2,798 |
Ya know? I think I got it. Thanks!
|
|
|
|
Joined: May 2001
Posts: 2,798
Member
|
Member
Joined: May 2001
Posts: 2,798 |
jordo. You forgot to write in the close and reopen options. Do you think you could help me with it? I tried but it didnt work.
[ July 06, 2001 05:07 PM: Message edited by: Tech-Ni-Kal ]
|
|
|
|
Joined: May 2001
Posts: 2,798
Member
|
Member
Joined: May 2001
Posts: 2,798 |
Also, if its supposed to display the dropdown option it displays it but the images still are above. And the drop down options dont work because they are linked as img tages still. Really need your help on this.
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 21,079
Joined: March 2000
|
|
Forums63
Topics37,573
Posts293,925
Members13,849
|
Most Online5,166 Sep 15th, 2019
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|