BHD Heartbeat
Hi Scott, would it be possible to add a map image to the coding showing which map is playing?
|
It should be possible if you have the map images for sure. Your code would look something like this:
Code:
if(file_exists("/pathto/mapimages/".$Server['MissionFile'].".jpg")) { |
Not sure if i got this right, code added to the status.php.
Added a new folder into the BHD directory with an image called nophoto.jpg Code:
if(file_exists("/Program files(X86)/Novalogic/Delta Force Black Hawk Down/mapimages/".$Server['MissionFile'].".jpg")) { |
Well you'd upload the files to your ftp and put the paths there. Something like (using tio coop status page for example):
Code:
if(file_exists("./mapimages/".$Server['MissionFile'].".jpg")) { |
LOL i tried that at first, made the map folder url /PHPScripts/mapimages/nophoto.jpg
But i figured it would call from the BHD folder, hence why i used that path. OK, now im using the correct domain it works better too I used the Outpost not TIO site to upload files (TIO is a sub domain) Got the No Image to show, now just got to get the map images to show now. http://www.tiocoop.com/Content/pid=10.html |
If you're on Linux, the file name needs to have the same case as the map name. Like MapName.bms is not the same as mapname.bms on Linux. If you make sure all the photos are lower case you can use this:
Code:
if(file_exists("./mapimages/".strtolower($Server['MissionFile']).".jpg")) { |
still no luck with map images.
i did notice though, line 2 of code: .".jpg" doesn't have the \ and breaks the coding if not added. But you had it in first post coding. PS Thanks for your help Scott, think i've had too much xmass cheer brain is still on holiday mod lol, |
Sorry just got back from Christmas break... You're right, it should be:
Code:
if(file_exists("./mapimages/".strtolower($Server['MissionFile']).".jpg")) { If you need some more help I can ftp in and help you out. |
Thank You very much Scott, everything is working spot on now.
To make it easy for others to upload map images i figured i would try your phUploader.php I changes the path from Uploads to mapimages, it works and uploads fine. Problems i have now is the error below and also the image uploaded changes it's name to 1432644.jpg Is the a way to keep it's original name when uploading? Code:
Warning: main(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/novaoutp/public_html/tiocoop.com/phUploader.php on line 198 Code:
If(($_POST['submit']==true) AND ($password_form=="")) { |
in phuploader.php set:
Code:
$random_name=true; Code:
$random_name=false; Code:
if(!empty($_POST['submit']) && $_POST['submit']==true && $password_form=="") { |
TY again Scott :)
That got rid of the error. But.... When i add a password i get the errors Code:
Warning: main(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/novaoutp/public_html/tiocoop.com/phUploader.php on line 166 Line 166 Code:
If($_POST['verify_password']==true) { Code:
If($_COOKIE['phUploader']!=$password_hash) { I think this is pretty cool, having the HeartBeat with stats and images and an easy way to upload the map images Thanks again Scott |
Guess I should update my script at some point...
Line 166 Code:
If(!empty($_POST['verify_password']) && $_POST['verify_password']==true) { Code:
If(empty($_COOKIE['phUploader']) || $_COOKIE['phUploader']!=$password_hash) { |
wow, everything is spot on now! :hail:
Thanks Scott |
The phUploader kept taking the dot out of the file for the .bms
So the name would be test.bms.jpg but when it uploaded it is testbms.jpg I got around this by changing the status.php file from MissionFile to MissionName, i don't need to use the .bms extention now :clap2: |
That'll work as long as they are exact :)
|
Ok, i got one more question, if i may.
The map image i have set at 250px width How would i add, onclick of image to open at 800x600px. Thanks ~BLÃÐE~ |
Hi Blade, it would look something like this:
Code:
|
Thanks again Scott, i was close in my coding lol, can't believe i have forgotten the basic stuff not doing any coding for years.
Ok so i think i have finished doing everything i can to it now lol. |
Glad you got it working, BTW how is the heartbeat working out for you guys? I see MANY more BHD servers using it now which is great and will really help keep the lobbies up and running for years (fyi it also reports data to novaworld.cc if novahq ever goes down). Keep spreading the word :)
|
Hi Scott, yeah we got about 7 servers up with HeartBeat in total with Mod and BHD/TS Servers (half the HB List lol)
Been trying to spread the word to whom ever we can... |
All times are GMT -5. The time now is 09:57 PM. |
Powered by vBulletin®