Author: admin

  • Adding iOS Icons for Bookmarks

    Since newer PHP Melody themes such as the Echo theme are responsive you might want to add your own app-like icon for iOS devices.

    That’s because when bookmarked, your site will have a nice little icon on the user’s screen; just like a native app.

    Pro tip: You can create the required icons from your own logo: https://iconifier.net/

    Your default icon should be 57x57px. But iPad and Retina devices need to provide more sizes. iPad requires icons with the size of 72x72px, while Retina devices need icons with 114x114px size.

    Once you have the icons you need to edit your PHP Melody theme header.

    Open:
    /templates/[current theme]/header.tpl

    Find:

    <link rel="shortcut icon" href="{$smarty.const._URL}/templates/{$smarty.const._TPLFOLDER}/img/favicon.ico">

    After, add:

    <link rel="apple-touch-icon" href="https://your-site-com/icon.png"/>
    <link rel="apple-touch-icon" sizes="72x72" href="https://your-site-com/icon.png"/>
    <link rel="apple-touch-icon" sizes="114x114" href="https://your-site-com/icon.png"/>
  • How can I change the header background color?

    Updating the header background color in the Echo theme is quite easy.

    Open your /templates/Echo/css/echo.css file:

    Find:

    /*-----------------------------------------------------------------------------------*/
    /*    3.Header (Navigation, Search, etc.)
    /*-----------------------------------------------------------------------------------*/
    header.pm-top-head {
      display: table;
      position: fixed;
      background: #FFF;
      border-bottom: 1px solid #e8e8e8;

     

    Replace both #FFF and #e8e8e8 with your desired color code.

  • XML error: syntax error at line 1

    PHP Melody sites running versions older than v2.3.1 might give the following error while working/importing YouTube videos:

    XML error: syntax error at line 1

    In case your site is running a PHP Melody version earlier than v2.3.1, you will have to update it to the latest release because the YouTube API used before PHP Melody v2.3.1 is now deprecated (no longer working). Such sites cannot be fixed as the entire API code was replaced throughout the codep/product.

    Check our update guide to update your PHP Melody site today.

  • How to Fix: Warning: session_start() [function.session-start]: open(/tmp/sess_…O_RDWR) failed.

    So, you’ve just installed or moved your PHP Melody installation to a new server and you’re greeted with this message:

    Warning: session_start() [function.session-start]: open(/tmp/sess_e0725de9954b..2c14904, O_RDWR) failed: Permission denied (13) in /home/melody/public_html/stuff.php on line 42

    This error basically indicates that the server’s PHP installation is not really configured that well. Note: We’re not referring to the PHP Melody installation, but the actual PHP runtime.

    As a result, the first thing you should do is report this error to your hosting provider. They should have a ‘live chat’ available for such things and you could solve this problem in a matter of minutes.

    If for some reason you don’t or can’t report the problem to someone who will address it, you may be able to solve this problem yourself.

    How to change the sessions folder

    Most hosting providers will allow you to either create your custom php.ini file or modify an existing php.ini file via your cPanel or Plesk account.

    See if your hosting provider allows you to update your “PHP Configuration” from your account management panel (cPanel, Plesk, etc.).

    Once you’ve found your PHP configuration file (php.ini), search for the following line:

    session.save_path =
    

    If you don’t have root access to the server in order to set the correct permissions to the /tmp folder, create a new folder which you can control and use it as the default folder for your PHP session files.

    For example, if your hosting’s account path is:

    /home/videos34/public_html/

    Create a new folder for your sessions (outside the public_html folder would be best) as such:

    /home/videos34/tmp/

    Next, change the permissions for your tmp folder to 0777 (fully writable).
    Now you can specify this new folder in your php.ini as such:

    session.save_path = '/home/videos34/tmp/'