miniBB ® 

miniBB

®
Support Forums
  
 | Start | Register | Search | Statistics | File Bank | Manual |
Specific miniBB Support Forums / Specific /  
 

The BB_Specials.php Arrays

 
Author DJCMBear
Partaker
#1 | Posted: 22 Mar 2009 10:52 
I was just wondering if i could use the arrays in bb_specials.php but without haveing to type the user id's out within the php page because i have already writen the code out and it works but i dont know if there is a way to use the arrays with the output of the code i have writen such as

$clForums=array(1, 2);
$clForumsUsers[1]=array($User);
$clForumsUsers[2]=array($User);

When i change the number to 1 under the user_custom column in a users row in the database then the user_id of that row is outputted to $User so what you get is if i change the number of user_custom to 1 lets say in row 5 and the id of that user is 5 then $User outputs 5, and if i change the number of user_custom to 1 in row 10 then you would get 5, 10, and so on. could that be done with the arrays so you dont have to worry about writing the user id in.

and if the user_id is in that array could i put a special image next to their username in their posts?

Author Paul
Lead Developer 
#2 | Posted: 23 Mar 2009 04:03 
DJCMBear:
and if the user_id is in that array could i put a special image next to their username in their posts
You must check $userRanks variable format regarding that case.

As for other stuff, I didn't understand what do you want to achieve.

Author DJCMBear
Partaker
#3 | Posted: 23 Mar 2009 05:44 
thanks for the info and what i wanted to know is if i could use a variable within then arrays in the specials file

Author Paul
Lead Developer 
#4 | Posted: 23 Mar 2009 08:09 
Of course you can, but in that case it should be the array syntax itself.

I.e. $clForumsUsers[2]=$User;

where $User is an array itself.

Author DJCMBear
Partaker
#5 | Posted: 24 Mar 2009 08:36 
thank you because i have done alot of php scripts for the forum but trying to add them to the forum you have to try and not take something out that needs to be there because with the members addon i want a VIP image next the user name of the VIP users and have done it in my personal admin panel and not the one on the forum but trying to do it on the forums members addon its a different story im not asking for help i was just saying that im good with php but when adding things to someone elses script you dont know what you need and what you dont but the members addon isnt to do with this so i wasnt asking for help there. what i would like to be answered is if my php script is in its own file what php file would i need to include it in for the forum to include it and with the special image next to the users name i did use to use the user ranks but i wanted a script that would read from the mysql db which with what i said before i did with the members list in my admin panel but could that be done with what im doing with the $user?

Author Paul
Lead Developer 
#6 | Posted: 24 Mar 2009 08:54 
DJCMBear:
adding things to someone elses script you dont know what you need
Reading text without commas is hard to understand as well.

I'm still not sure what you are asking for, so it's up to you. For displaying an image next to the username try to refer to avatars add-on. It already contains similar code how to display it.

Author DJCMBear
Partaker
#7 | Posted: 24 Mar 2009 09:08 
true im bad at commas but will try n use them, what file would i need to include my script in for the $User to read from?, and ill play around with the codes and try n find away to do the picture thing thank you

Author Paul
Lead Developer 
#8 | Posted: 25 Mar 2009 04:12 
DJCMBear:
what file would i need to include my script in for the $User to read from
If you know PHP well, it's up to your imagination how to implement it :-)

Author DJCMBear
Partaker
#9 | Posted: 25 Mar 2009 07:35 
i know that but which minibb file would i include it in would it be the functions file?

Author Paul
Lead Developer 
#10 | Posted: 25 Mar 2009 08:34 
I suppose you should include your own file, or use your own part of code under bb_specials.php.

Author DJCMBear
Partaker
#11 | Posted: 29 Mar 2009 19:24 
ok thank you for your help

Specific miniBB Support Forums / Specific /
 The BB_Specials.php Arrays
 Share Topic's Link

Your Reply Click this icon to move up to the quoted message


  ?
Post as a Guest, leaving the Password field blank. You could also enter a Guest name, if it's not taken by a member yet. Sign-in and post at once, or just sign-in, bypassing the message's text.


Before posting, make sure your message is compliant with forum rules; otherwise it could be locked or removed with no explanation.

 

 
miniBB Support Forums Powered by Forum Software miniBB ® Home  Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Install the Captcha add-on: protect your miniBB-forums from the automated spam and flood.


  ⇑