Jump to content

mark1million

Moderators
  • Posts

    2283
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by mark1million

  1. Sorry. I will try to explain better. I am using different skin and with this code

    <td width="1%" nowrap><a href="<?php echo url('/profile/view/'.$pilot->pilotid);?>">
    <?php echo PilotData::GetPilotCode($pilot->code, $pilot->pilotid)?></a>
    

    pilot id taking me to old skin. I want to change this php echo url to www.mywebsite.com

    to do this i have to make little change on this line also ('/profile/view/'.$pilot->pilotid;?>">

    this is what i am trying to do.

    Thanks.

    Ok i think this is what you need,

    <td width="1%" nowrap><a href="http://www.yoursite.com/profile/view/<?php echo $pilot->pilotid;?>">
    <?php echo PilotData::GetPilotCode($pilot->code, $pilot->pilotid)?></a>
    

    If im understanding you correct.

  2. They should update, if it doesnt its broken, I presuming your accepting pireps without triggering the correct process to update the back end ie hours flights etc etc.

    If you look in the forum there is something that is documented how to automatically accept pireps the correct way using the api.

  3. Ok so under the line

    'EDIT_FLEET' => 0x20,

    add

    'EDIT_ADDONS' => 0x40,

    Then i need to see the addons module in the Admin>modules folder because you need to add the permission in there for it to check.

    Plus you also need to add the description for that permission as well or your dropdown will be blank.

    so add it in here

    # Discriptions for permission sets

    $permission_discription = array(

    /*'NO_ADMIN_ACCESS' => 0,*/

    'ACCESS_ADMIN' => 'Give a user access to the administration panel. This is required if any other permissions are set.',

    'EDIT_NEWS' => '(News & Content) Give a user access to add & edit the news & notams.',

    'EDIT_PAGES' => '(News & Content) Give a user access to add & edit the pages.',

    'EDIT_DOWNLOADS' => '(News & Content) Give a user access to add & edit the downloads.',

    'EMAIL_PILOTS' => '(News & Content) Give a user access to email your pilots.',

  4. Basically you can but you got to know what your doing, you define new permissions in your local config then all the permission to the file you want, example,

    /**
    * Library Includes (from 3rd Party)
    */
    
    # Bit-masks for permission sets
    $permission_set = array(
      /*'NO_ADMIN_ACCESS'        => 0,*/
      'ACCESS_ADMIN'          => 0x1,
      'EDIT_NEWS'              => 0x2, 
      'EDIT_PAGES'            => 0x4,
      'EDIT_DOWNLOADS'        => 0x8,
      'EMAIL_PILOTS'              => 0x10,
      'EDIT_AIRLINES'             => 0x20,
      'EDIT_FLEET'            => 0x40,
      'EDIT_SCHEDULES'        => 0x80,
      'IMPORT_SCHEDULES'          => 0x100,
      'MODERATE_REGISTRATIONS'   => 0x200,
      'EDIT_PILOTS'           => 0x400,
      'EDIT_GROUPS'           => 0x800,
      'EDIT_RANKS'            => 0x1000,
      'EDIT_AWARDS'           => 0x2000,
      'MODERATE_PIREPS'       => 0x4000,
      'EDIT_PIREPS_FIELDS'    => 0x8000,
      'VIEW_FINANCES'             => 0x10000,
      'EDIT_EXPENSES'             => 0x20000,
      'EDIT_SETTINGS'             => 0x40000,
      'EDIT_PROFILE_FIELDS'      => 0x80000,
      'EDIT_VACENTRAL'        => 0x100000,
       'MAINTENANCE'              => 0x2000000,
       'TRAINING_SYSTEM'              => 0x4000000,
       'TOUR_SYSTEM'              => 0x8000000,
       'EVENTS_SYSTEM'              => 0x10000000,
       'SHOP_SYSTEM'              => 0x20000000,
      //'FULL_ADMIN'          => 2147483647 // This is the supposed maximum, however it's still working!
       'FULL_ADMIN'                => 0x1FFFFFFF
    );
    # Discriptions for permission sets
    $permission_discription = array(
      /*'NO_ADMIN_ACCESS'        => 0,*/
      'ACCESS_ADMIN'          => 'Give a user access to the administration panel. This is required if any other permissions are set.',
      'EDIT_NEWS'              => '(News & Content) Give a user access to add & edit the news & notams.',
      'EDIT_PAGES'            => '(News & Content) Give a user access to add & edit the pages.',
      'EDIT_DOWNLOADS'        => '(News & Content) Give a user access to add & edit the downloads.',
      'EMAIL_PILOTS'              => '(News & Content) Give a user access to email your pilots.',
      'EDIT_AIRLINES'             => '(Airline Operations) Give a user access to add & edit your airlines.',
      'EDIT_FLEET'            => '(Airline Operations) Give a user access to add & edit your fleet.',
      'EDIT_SCHEDULES'        => '(Airline Operations) Give a user access to add & edit schedules.',
      'IMPORT_SCHEDULES'          => '(Airline Operations) Give a user access to import and export schedules.',
      'MODERATE_REGISTRATIONS'   => '(Pilots & Groups) Allow a user to moderate new site registrations.',
      'EDIT_PILOTS'           => '(Pilots & Groups) Give a user access to edit your pilots.',
      'EDIT_GROUPS'           => '(Pilots & Groups) Give a user access to add & edit pilot groups. Might aswell just give them full admin.',
      'EDIT_RANKS'            => '(Pilots & Groups) Give a user access to add & edit ranks.',
      'EDIT_AWARDS'           => '(Pilots & Groups) Give a user access to add & edit awards.',
      'MODERATE_PIREPS'       => '(Pilot Reports (PIREPS)) Give a user access to moderate PIREPS',
      'EDIT_PIREPS_FIELDS'    => '(Pilot Reports (PIREPS)) Give a user access to add and edit PIREPS fields.',
      'VIEW_FINANCES'             => '(Reports & Expenses) Give a user access to view your finances.',
      'EDIT_EXPENSES'             => '(Reports & Expenses) Give a user access to edit your expenses.',
      'EDIT_SETTINGS'             => '(Site & Settings) Give a user access to edit your site settings.',
      'EDIT_PROFILE_FIELDS'      => '(Site & Settings) Give a user access to add and edit profile fields.',
      'EDIT_VACENTRAL'        => '(Site & Settings) Give a user access to edit your VACentral Settings.',
       'TRAINING_SYSTEM'              => 'Gives Access to the Training System',
       'TOUR_SYSTEM'              => 'Access in to the admin Tours',
       'EVENTS_SYSTEM'              => 'Grant Access to the Events',
       'SHOP_SYSTEM'              => 'Grant Access to the Pilot Shop Admin',
       'FULL_ADMIN'           => 'Full Administration Over-ride. This option will automatically overide all above settings, enabling all of them.'
    );
    Config::Set('permission_set', $permission_set);
    Config::Set('permission_discription', $permission_discription);
    define('NO_ADMIN_ACCESS', 0);
    foreach($permission_set as $key=>$value) {
      define($key, $value);
    }
    foreach($permission_discription as $key=>$value) {
      define($key.'_DISCRIP', $value);
    }
    

    As you can see i have added permissions for tour system, events system shop system etc etc then in the admin modules you need to add a permissions check like.

            $this->checkPermission(SHOP_SYSTEM); 

    Basically if you dont know what your doing then leave it alone would be my advise.

  5. I've just done a quick skin conversion which works on my side, but may not necessarily work on yours (hence I can't offer much support on this)

    But you're willing to give it a go

    https://github.com/w...dmin-Panel-Skin

    I believe this one is in the making http://forum.phpvms....admin-template/

    Remember, backup,backup,backup

    -- If you have your website locally, I'd try it there first to make sure everything works as it should

    Thanks, do you have any images?

  6. Has anyone done a admin skin update?

    Im being really lazy and willing to pay if things are 100% working?

    I have enough on my plate keeping 2 sites updated and the development of those to work on another project.

    Any offers?

  7. The code to show field values is, just add your own image name where it says "NAME OF YOUR IMAGE"

    <?php $fieldvalue = PilotData :: GetFieldValue ( $pilot -> pilotid , 'vatsim id );
    if( $fieldvalue != '' )
    {
    echo '<a href="https://vataware.com/pilot/' . $fieldvalue . '" target="_blank"><img src="'.SITE_URL.'/NAME OF YOUR IMAGE" width="90" height="55" border="0" alt="Vatsim ID" /></a><br />Vatsim Stats' ;
    }
    else
    {
    echo 'Vatsim Stats<br />No Data Found';
    }
    ?>
    

  8. Ok i would probably go with the security questions, i have already modified the registration fields and forms with extra fields in the database for required information so adding more for security questions wont be a problem, next task would be implementing the change in the code.

  9. Hey guys i recently had some malicious users causing trouble by using the forgot password function on the phpVms system and running various email addresses through the function.

    Basically i have disabled this function from all apart from admins as anyone that knows your email address can use the system to reset your password potentially locking you out if you miss the email, not only that if they gain access to your email then they have your whole site.

    The current way that the system used is too insecure which is why i have disabled it, does anyone have a better way thats been thought of and implemented?

  10. You can go to google and register your own set of keys if needed, the url changed a while ago for captcha the settings are in the config file but if you do change them place it in your local config file.

    Existing keys should look like,

    /* Keys for recaptcha, you can change these if you want to your own but it's
    a global key so it should just work */
    Config::Set('RECAPTCHA_PUBLIC_KEY', '6LcklAsAAAAAAJqmghmMPOACeJrAxW3sJulSboxx');
    Config::Set('RECAPTCHA_PRIVATE_KEY', '6LcklAsAAAAAAMeQy5ZBoDu8JOMTP-UL7ek1GedO');
    

  11. Lol damn right under my nose. Just couldn't find it for looking lol.

    I'm fed up of users registering with blank fields for dob and vatsim so I have updated the registration form and the database to move away from custom fields so I can enforce validation.

    All works fine apart from the validation.

    Thanks again.

  12. Ok i have figured it out for anyone wishing to comply with google here is the fix.

    open up your /core/templates/core_htmlhead.tpl or ,php depending if you have converted to php files, the line you are looking for is,

    <script type="text/javascript" src="https://maps.google.com/maps/api/js?sensor=true"></script>
    

    You need to replace that with

    <script async defer src="https://maps.googleapis.com/maps/api/js?key=PLACE YOURKEY IN HERE&callback=initMap"></script>
    

    Replace PLACE YOURKEY IN HERE with your generated key

    To generate your API key from Google log in to your Google account and go to https://developers.g...get-api-key#key

    Remember this modification will get overwritten on any update as its in the core_htmlhead.tpl

  13. Hey guys this may seem odd but in the settings page of admin (/admin/index.php/settings) there should be a place to input your google maps api key, on the dev version my field is missing, can i add this in to the local congig directly or where does it go.

    By the way google maps work fine never had an issue but there is an error in the console of chrome stating about the api

    Cheers.

    post-75-0-71428700-1462023630_thumb.png

×
×
  • Create New...