dimitris Posted July 14, 2011 Report Share Posted July 14, 2011 Developed and Tested on: phpVMS 2.1.934 php 5.2.6 By: dimitris | http://www.greeceairwaysva.com/ phpVMS module to allow pilots submit sceneries (hosted on other locations) to create a database. Each scenery need to be approved by an Admin before the public view. Create a link at: <?php echo url('/Scenery'); ?> To view the scenery list and admin. See post #4 for updated version 2 Quote Link to comment Share on other sites More sharing options...
Txmmy83 Posted July 14, 2011 Report Share Posted July 14, 2011 thank you very much Best Regards Thomas Quote Link to comment Share on other sites More sharing options...
Txmmy83 Posted July 14, 2011 Report Share Posted July 14, 2011 did not work for me just to clearify if Installed right move the module & template folder to Core folder run the SQL file set the link to the module http://www.flyeurope-va.org/index.php/secenery right? ok just found the error! typo by myself secenery scenery is better I think but strange thing it doesent work even right spelled I always get this message An Error Was Encountered The module "SCENERY" doesn't exist! any Idea? how to fix Best Regards Thomas Quote Link to comment Share on other sites More sharing options...
dimitris Posted July 14, 2011 Author Report Share Posted July 14, 2011 Hi Thomas I found the error you are referring to Problem is now fixed and version 1.1 is now uploaded please check it and tell me. If you are getting a MySQL fetch_array error check the name of the prefix of database's table to be the same as the other tables. Regards, Dimitris See post #10 for version 1.2 - Added FS versio (By TAV1702) 1 Quote Link to comment Share on other sites More sharing options...
Txmmy83 Posted July 14, 2011 Report Share Posted July 14, 2011 everything work like it should now and again thanks for the great addon Best Regards Thomas Quote Link to comment Share on other sites More sharing options...
Tato123 Posted July 16, 2011 Report Share Posted July 16, 2011 Hi, I have installed the Addon but when i click the Submit scenery or admin scenery or Scenary list nothing happens Please Help me. Quote Link to comment Share on other sites More sharing options...
dimitris Posted July 17, 2011 Author Report Share Posted July 17, 2011 Hi Tato! What is your website pleasee ? I will try to access the pages with direct links to see if there is any error with the links Quote Link to comment Share on other sites More sharing options...
Tato123 Posted July 18, 2011 Report Share Posted July 18, 2011 I solved, my problem was Internet Explorer 8. Whit chrome o Firefox or IE9 i' don'have a problem Thanks Quote Link to comment Share on other sites More sharing options...
TAV1702 Posted July 19, 2011 Report Share Posted July 19, 2011 That's actually pretty cool and works great. How about a little section for notes the submitter can add. For example, Scenery file for FSX only. Will not work on FS9. Should be fairly simple to do. I can even hack it together and update the database if needs be. Quote Link to comment Share on other sites More sharing options...
TAV1702 Posted July 19, 2011 Report Share Posted July 19, 2011 I got a flight sim version hacked together and working for this. If interested dimitris, let me know and I will send you the updated files and the database insert. Ray **EDIT** I am attaching my version per dimitris. I have included a read me in the file. PLEASE make sure you read it. All code I have added I give freely to dimitris to add to his mod and do with what he wishes. I claim no ownership over his work or mine. It is all his. Quote Link to comment Share on other sites More sharing options...
dimitris Posted July 20, 2011 Author Report Share Posted July 20, 2011 Hi TAV1702! Thanks for your interest and also thank you for extending the code You are free to publish it here at this thread Quote Link to comment Share on other sites More sharing options...
TAV1702 Posted July 20, 2011 Report Share Posted July 20, 2011 Ok will do. Let me take a double look at the files real quick and make sure I did not add anything extra or leave anything out. I will have it up here momentarily. Done! I attached it to the post that I put the screenshot in. Ray Quote Link to comment Share on other sites More sharing options...
dimitris Posted July 20, 2011 Author Report Share Posted July 20, 2011 Hi Ray! Thanks for the update I just edited the code so the users select from a dropdown list the FS version: To do it open add_scenery.tpl and find this line: <td><input type="text" name="simv" id="simv" /></td> about 16 and replace with: <td><select name="simv"> <option>FS9</option> <option>FSX</option> <option>Xplane 9</option> <option>Xplane 10</option> </select> </td> To add more Fs versions add: <option>Whatever you like!</option> The above is working with files from Scenery_v1.2.rar Regards, Quote Link to comment Share on other sites More sharing options...
TAV1702 Posted July 20, 2011 Report Share Posted July 20, 2011 Ahh ya beat me to it. lol I was actually going to work on that here in a bit. I was working on the old pilot shop mod for a bit. Nice I will have to make those changes. Thanks! Quote Link to comment Share on other sites More sharing options...
Nighthawk Posted July 22, 2011 Report Share Posted July 22, 2011 !!!!Deleted because securtiy leak ( my mistake). If u use my posted code please delete it!!!!# This is the Correct: <?php $result = mysql_query("SELECT COUNT(*) FROM phpvms_scenery WHERE active=0"); $num_rows = mysql_result($result,0); ?> Quote Link to comment Share on other sites More sharing options...
TAV1702 Posted July 25, 2011 Report Share Posted July 25, 2011 That is a nice little addition. Now, I think it would be wiser to make that an admin module so it shows up on the addons tab. That way no edits will be over written in a update to phpVMS. Quote Link to comment Share on other sites More sharing options...
TAV1702 Posted July 28, 2011 Report Share Posted July 28, 2011 This will actually allow people to download who are not logged in to your site. We need to add a check in. As well, I also got an admin module kicked up and running. I only have one small error left to work out and I am sure it is a simple typo somewhere. Quote Link to comment Share on other sites More sharing options...
Jeff Posted July 29, 2011 Report Share Posted July 29, 2011 This will actually allow people to download who are not logged in to your site. Just add this in the .tpl file <?php if(Auth::LoggedIn() == false) { echo 'You must be logged in to view this page!'; return; } ?> Quote Link to comment Share on other sites More sharing options...
Txmmy83 Posted July 29, 2011 Report Share Posted July 29, 2011 This will actually allow people to download who are not logged in to your site. Just add this in the .tpl file <?php if(Auth::LoggedIn() == false) { echo 'You must be logged in to view this page!'; return; } ?> that's not too dramatic with exception if an VA develops their own member only scenery files what is far more a problem is that even non members can post links to sceneries by default which can open a potential door for spamming (pornlinks, etc) Best Regards Thomas Quote Link to comment Share on other sites More sharing options...
Strider Posted July 29, 2011 Report Share Posted July 29, 2011 that's not too dramatic with exception if an VA develops their own member only scenery files what is far more a problem is that even non members can post links to sceneries by default which can open a potential door for spamming (pornlinks, etc) Best Regards Thomas Hence why admin's have to approve each link. You also put the code to stop people from getting into the scenery insert area. Quote Link to comment Share on other sites More sharing options...
Txmmy83 Posted July 29, 2011 Report Share Posted July 29, 2011 I will probably put it only in scenery Insert area since my VA does not use any customized scenery files Best Regards Thomas Quote Link to comment Share on other sites More sharing options...
Nighthawk Posted July 29, 2011 Report Share Posted July 29, 2011 I dont need this, because i put the Sce DB in the Pilot Center, so u must log in first, and only members can post things and "bad" links... When u add an row for type e.g. "Aircraft" u can use it as admin, that members can post good tools and other things??? Is this an usefull idea? Quote Link to comment Share on other sites More sharing options...
James142 Posted July 29, 2011 Report Share Posted July 29, 2011 copy in admin/templates/sidebar_dashboard.tpl <p> <?php $link = mysql_connect("Db ADDRESS", "Your DB User Name", "[color="Your DB Password"); mysql_select_db("phpvms", $link); $result = mysql_query("SELECT COUNT(*) FROM phpvms_scenery WHERE active=0", $link); $num_rows = mysql_result($result,0); ?> <strong><a href="<?php echo SITE_URL?>/index.php/scenery/admin"><?php echo "$num_rows" ?></strong> Scenery pending</a> </p> change DB address, db USer and DB Password !! Using that code could let anyone access your mySQL database for phpvms as they could just download the sidebar_dashboard.tpl file (http://www.yourdomain.com/admi/templates/sidebar_dashboard.tpl). Unless of course, you have the .htaccess file which stops people from downloading files from your site Quote Link to comment Share on other sites More sharing options...
Nighthawk Posted July 29, 2011 Report Share Posted July 29, 2011 thanx for your advice, i make an bad mistake there !!!! That is the correct <?php$result = mysql_query("SELECT COUNT(*) FROM phpvms_scenery WHERE active=0"); $num_rows = mysql_result($result,0); ?> Quote Link to comment Share on other sites More sharing options...
TAV1702 Posted July 31, 2011 Report Share Posted July 31, 2011 I actually added a bit of code to the php file and you can no longer get to the scenery database at all unless logged in. I had pondered using that little ditty of code as we all do, but I figured this time I would do it php style. It worked out great. I got side tracked on the work I was doing on this fellas mod. I hope to get back on my admin module in the next day or two. Quote Link to comment Share on other sites More sharing options...
Ameer Posted November 18, 2011 Report Share Posted November 18, 2011 delete i fix my problem ty Quote Link to comment Share on other sites More sharing options...
ukmil Posted November 30, 2011 Report Share Posted November 30, 2011 one way to stop people viewing without login, is simple do not add a menu link, instead, add the link to the Pilot Centre so, open profile_main.tpl Find the lines <li><a href="<?php echo url('/profile/editprofile'); ?>">Edit My Profile, Email and Avatar</a></li> <li><a href="<?php echo url('/profile/changepassword'); ?>">Change my Password</a></li> <li><a href="<?php echo url('/profile/badge'); ?>">View my Badge</a></li> <li><a href="<?php echo url('/profile/stats'); ?>">My Stats</a></li> <li><a href="<?php echo url('/downloads'); ?>">View Downloads</a></li> then add this to next line <li><a href="<?php echo url('/Scenery'); ?>">View Scenery Links</a></li> then, only people who have a pilot profile, can see the link Quote Link to comment Share on other sites More sharing options...
Tato123 Posted December 22, 2015 Report Share Posted December 22, 2015 Warning: mysql_query(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /web/htdocs/www.virtualiroma.it/home/newvar/core/modules/Scenery/Scenery.php on line 16 Warning: mysql_query(): A link to the server could not be established in /web/htdocs/www.virtualiroma.it/home/newvar/core/modules/Scenery/Scenery.php on line 16 Warning: mysql_result() expects parameter 1 to be resource, boolean given in /web/htdocs/www.virtualiroma.it/home/newvar/core/modules/Scenery/Scenery.php on line 17 Any Suggestion? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.