Location: PHPKode > projects > Maian Gallery > maian_gallery/docs/setup/faq.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Maian Gallery v2.0 Documentation - Documentation - Frequently Asked Questions</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<link href="stylesheet.css" rel="stylesheet" type="text/css">
</head>

<body>
<div align="center">
<table width="760" border="0" cellpadding="0" cellspacing="0" align="center">
<tr>
    <td align="left" valign="top" colspan="2" height="60"><img src="images/logo.gif" alt="Documentation" title="Documentation"></td>
</tr>
</table>
<table width="760" border="0" cellpadding="0" cellspacing="0" style="border:1px solid #FFFFFF">
<tr>

    <td>
    <table width="760" border="0" cellpadding="0" cellspacing="0" align="center">
    <tr>
        <td align="center" class="nav_menu">&lt; <a href="index.html" title="Home">Home</a> - <a href="install.html" title="Installation/Usage">Installation/Usage</a> - <a href="paypal.html" title="Paypal Setup">Paypal Setup</a> - <a href="themes.html" title="Themes">Themes</a> - <a href="faq.html" title="F.A.Q" style="color:#A4E4F5">F.A.Q</a> - <a href="info.html" title="Script Info">Script Info</a> &gt;</td>
    </tr>
    <tr>
        <td align="left" valign="top" style="padding:10px;" colspan="2" class="main">
        <!-- BEGIN TEMPLATE LOADING -->
Some frequently asked questions are shown below. Please check here before requesting support:
<br>
   </td>
</tr>
<tr>
    <td class="header" colspan="2" align="left">&raquo; <b>Q: HOW DO I KNOW IF MY SERVER HAS THE GD2 LIBRARY INSTALLED?</b></td>
</tr>
<tr>
    <td align="left" valign="top" style="padding:10px;" colspan="2" class="main">
    For the captcha, auto thumbnail feature &amp; watermarks, your server is required to have GD library enabled.<br><br>
      To find out if your server has this module installed you need to view your PHP configuration data. To do this copy and paste the following into a text editor:<br><br>
      <table border="0" cellpadding="0" cellspacing="0" width="100%" style="border:1px solid #FFFFFF;background-color:#0F5B96">
      <tr>
          <td align="left" style="padding:5px">&lt;?php<br>
          <b>phpinfo();</b><br>
          ?&gt;</td>
      </tr>
      </table><br>
      Save the file as 'test.php' and upload to your server. Once uploaded access this file in your browser. You are looking for the data shown in the following image (note that versions may vary. should ideally be v2 or higher):<br><br>
      <div style="text-align:center"><img src="images/gd.jpg" alt="GD Library" title="GD Library" style="border:1px solid #063052"></div>
      </td>
</tr>
<tr>
    <td class="header" colspan="2" align="left">&raquo; <b>Q: OK, SO HOW DO I ENABLE IT?</b></td>
</tr>
<tr>
    <td align="left" valign="top" style="padding:10px;" colspan="2" class="main">
    If you are running your own server and the GD2 library is installed, but not enabled, open up your PHP.ini file and comment out the following line<br><br>
    <table border="0" cellpadding="0" cellspacing="0" width="100%" style="border:1px solid #FFFFFF;background-color:#0F5B96">
    <tr>
        <td align="left" style="padding:5px"><b>extension=php_gd2.dll</b></td>
    </tr>
    </table><br>
    Save file and then reboot the server. The script checks that this function is installed.</td>
</tr>
<tr>
    <td class="header" colspan="2" align="left">&raquo; <b>Q: HOW DO I KNOW IF MY SERVER HAS CURL INSTALLED?</b></td>
</tr>
<tr>
    <td align="left" valign="top" style="padding:10px;" colspan="2" class="main">
    PHP supports <a href="http://www.php.net/curl" title="Curl" target="_blank">libcurl</a>, a library created by <a href="http://curl.haxx.se/" title="Curl Website" target="_blank">Daniel Stenberg</a>, that allows you to connect and communicate to many different types of servers with many different types of protocols. It is required for the Paypal
      IPN system and is more reliable than using sockets, which are not supported by this script.<br><br>
      To find out if your server has this module installed you need to view your PHP configuration data. To do this copy and paste the following into a text editor:<br><br>
      <table border="0" cellpadding="0" cellspacing="0" width="100%" style="border:1px solid #FFFFFF;background-color:#0F5B96">
      <tr>
          <td align="left" style="padding:5px">&lt;?php<br>
          <b>phpinfo();</b><br>
          ?&gt;</td>
      </tr>
      </table><br>
      Save the file as 'test.php' and upload to your server. Once uploaded access this file in your browser. You are looking for the data shown in the following image:<br><br>
      <div style="text-align:center"><img src="images/curl.jpg" alt="Curl" title="Curl" style="border:1px solid #063052"></div></td>
</tr>
<tr>
    <td class="header" colspan="2" align="left">&raquo; <b>Q: HOW CAN I ADD NEW PAGES?</b></td>

</tr>
<tr>
    <td align="left" valign="top" style="padding:10px;" colspan="2" class="main">
    All my scripts are structured the same with the templates and they all use the <a href="http://www.phpsavant.com/yawiki/" title="Savant2" target="_blank">Savant2</a> template engine. I personally
      think this is the best template engine out there. Adding new pages is relatively easy:<br><br>
      [<b>1</b>] - Create a new .tpl.php file and pop it in the folder of the theme you are using. You might want to look at the structure of the others to get the same HTML/div information. These
      files can use both standard HTML and PHP.<br><br>
      [<b>2</b>] - Next open the index.php and find the closing <b>break;</b> at the bottom of the file. Lets say you create a new file called 'terms.tpl.php', after this break add the following:<br><br>
      <table border="0" cellpadding="0" cellspacing="0" width="100%" style="border:1px solid #FFFFFF;background-color:#0F5B96">
      <tr>
          <td align="left" style="padding:5px">
          case 'terms':<br>
          &#036;tpl =&amp; new Savant2();<br>
          &#036;tpl->display('templates/terms.tpl.php');
          </td>
      </tr>
      </table><br>
      Access the new page as 'index.php?cmd=terms'. If you are using mod_rewrite you`ll also need to add the 'terms' attribute to the first RewriteRule.<br><br>
      [<b>3</b>] - If you need to pass dynamic data into the template, assign a new var:<br><br>
      <table border="0" cellpadding="0" cellspacing="0" width="100%" style="border:1px solid #FFFFFF;background-color:#0F5B96">
      <tr>
          <td align="left" style="padding:5px">
          case 'terms':<br>
          &#036;tpl =&amp; new Savant2();<br>
          <b>&#036;tpl->assign('RANDOM', rand(1,9));</b><br>
          &#036;tpl->display('templates/terms.tpl.php');
          </td>
      </tr>
      </table><br>
      Then use &lt;?php echo $this->RANDOM; ?&gt; in the template. This example would generate a random number from 1 to 9. You could also add this directly into the template as &lt;?php echo rand(1,9); ?&gt;. You won`t need to pass data using the assign
      method unless you want content generated by the gallery system which couldn`t be accessed directly in the template.<br><br>
      Hope that helps create new pages. Note that if you use more than one theme, you will have to create a template file for each theme.
      </td>
</tr>
<tr>
    <td class="header" colspan="2" align="left">&raquo; <b>Q: WHAT`S CHMOD?</b></td>
</tr>
<tr>
    <td align="left" valign="top" style="padding:10px;" colspan="2" class="main">
    Short for 'Change Mode' its a Unix command that lets you tell the system how much (or little) access it should permit to a file. For more information on this contact your web hosting company or try a search on Google.    </td>
</tr>

<tr>
    <td class="header" colspan="2" align="left">&raquo; <b>Q: I CANNOT SET THE SCRIPT UP MYSELF. CAN YOU HELP?</b></td>
</tr>
<tr>
    <td align="left" valign="top" style="padding:10px;" colspan="2" class="main">
    Yes. So long as you think about sending a small donation first. For me to set the script up for you I`ll need access to your server via your control panel AND FTP access.
    </td>
</tr>
<tr>

    <td class="header" colspan="2" align="left">&raquo; <b>Q: HOW DO I SET UP A MYSQL DATABASE?</b></td>
</tr>
<tr>
    <td align="left" valign="top" style="padding:10px;" colspan="2" class="main">
    As servers vary, there is no one tutorial that can explain this procedure. Please contact your web hosting company who will be happy to advise you.
    </td>
</tr>
<tr>
    <td class="header" colspan="2" align="left">&raquo; <b>Q: DOES THE SCRIPT SUPPORT OTHER SEND MAIL OPTIONS?</b></td>
</tr>
<tr>

    <td align="left" valign="top" style="padding:10px;" colspan="2" class="main">
    Yes, it also supports SMTP. Set your SMTP settings in your admin area. If set, this overwrites the PHP mail function. Note that
    some servers don`t require authentication for SMTP.
    </td>

</tr>
<tr>
    <td class="header" colspan="2" align="left">&raquo; <b>Q: CAN I USE HTML IN MY E-MAILS?</b></td>
</tr>
<tr>
    <td align="left" valign="top" style="padding:10px;" colspan="2" class="main">
    Yes you can. Open the 'classes/class_mail.inc.php' &amp; 'admin/classes/class_mail.inc.php' files in your text editor and change the status of the 
    following var to true:<br><br>
    <table border="0" cellpadding="0" cellspacing="0" width="100%" style="border:1px solid #FFFFFF;background-color:#0F5B96">
    <tr>
        <td align="left" style="padding:5px"><b>var $html = false;</b></td>
    </tr>
    </table><br>
    Note that you`ll need line breaks (&lt;br&gt; or &lt;br /&gt;) in the templates or else the data will not display correctly.</td>
</tr>
<tr>
    <td class="header" colspan="2" align="left">&raquo; <b>Q: CAN I CHANGE HOW MANY LATEST/MOST VIEWED &amp; RANDOM PICTURES DISPLAY?</b></td>
</tr>
<tr>
    <td align="left" valign="top" style="padding:10px;" colspan="2" class="main">
    Yes. See the options in the 'inc/defined.inc.php' file.
    </td>
</tr>
<tr>
    <td class="header" colspan="2" align="left">&raquo; <b>Q: CAN YOU RECOMMEND SOFTWARE FOR AUTO CREATING THUMBNAILS?</b></td>
</tr>
<tr>
    <td align="left" valign="top" style="padding:10px;" colspan="2" class="main">
    Sure. The one I use is the excellent <a href="http://www.smalleranimals.com/thumb.htm" title="Smaller Animals Thumbnailer" target="_blank"><u>Smaller Animals Thumbnailer</u></a>. Bargain feature packed thumbnail creator for $25.00. If your budget is lower, try 
    <a href="http://www.fookes.com/ezthumbs/" title="Easy Thumbnails" target="_blank"><u>Easy Thumbnails</u></a>, <a href="http://www.etrusoft.com/graphic-converter/" title="Easy Graphic Converter" target="_blank"><u>Easy Graphic Converter</u></a> or
    <a href="http://www88.pair.com/sflex/index.html" title="Thumbnail Refinery" target="_blank"><u>Thumbnail Refinery</u></a>.<br><br>
    Note that I am not affiliated with any of the above. You use them at your own risk. If you have problems, contact the developers.
    </td>
</tr>
<tr>
    <td class="header" colspan="2" align="left">&raquo; <b>Q: CAN I INCREASE HOW MANY PICTURES SHOW IN THE RSS FEED?</b></td>
</tr>
<tr>
    <td align="left" valign="top" style="padding:10px;" colspan="2" class="main">
    Yes. See the options in the 'inc/defined.inc.php' file.
    </td>
</tr>
<tr>
    <td class="header" colspan="2" align="left">&raquo; <b>Q: CAN I DISABLE THE COMMENTS AUTO RESPONDER?</b></td>
</tr>
<tr>
    <td align="left" valign="top" style="padding:10px;" colspan="2" class="main">
    Yes. See the options in the 'inc/defined.inc.php' file.
    </td>
</tr>
<tr>
    <td class="header" colspan="2" align="left">&raquo; <b>Q: CAN I USE THE THEME SWITCHER IN THE HEADER TEMPLATE?</b></td>
</tr>
<tr>
    <td align="left" valign="top" style="padding:10px;" colspan="2" class="main">
    Yes. Use <b>&lt;?php echo &#036;this->THEME_SWITCHER; ?&gt;</b> to load the theme switcher div in the header template.
    </td>
</tr>
<tr>
    <td class="header" colspan="2" align="left">&raquo; <b>Q: SOME OF MY FILE NAMES ARE LONG. CAN I CROP THEM TO MAINTAIN TEMPLATE CONSISTENCY?</b></td>
</tr>
<tr>
    <td align="left" valign="top" style="padding:10px;" colspan="2" class="main">
    Yes. See the options in the 'inc/defined.inc.php' file.
    </td>
</tr>
<tr>
    <td class="header" colspan="2" align="left">&raquo; <b>Q: CAN I CHANGE THE SIZE OF THE QUESTION/CONTACT WINDOW?</b></td>
</tr>
<tr>
    <td align="left" valign="top" style="padding:10px;" colspan="2" class="main">
    Yes. See the options in the 'inc/defined.inc.php' file.
    </td>
</tr>
<tr>
    <td class="header" colspan="2" align="left">&raquo; <b>Q: CAN I CHANGE THE AMOUNT OF DATA THAT DISPLAYS PER PAGE IN THE ADMIN AREA?</b></td>

</tr>
<tr>
    <td align="left" valign="top" style="padding:10px;" colspan="2" class="main">
    Yes. See the options in the 'admin/inc/defined.inc.php' file.
    </td>
</tr>
<tr>
    <td class="header" colspan="2" align="left">&raquo; <b>Q: CAN I INCREASE HOW MANY LATEST COMMENTS SHOW ON THE ADMIN HOMEPAGE?</b></td>
</tr>
<tr>
    <td align="left" valign="top" style="padding:10px;" colspan="2" class="main">
    Yes. See the options in the 'admin/inc/defined.inc.php' file.
    </td>
</tr>
<tr>
    <td class="header" colspan="2" align="left">&raquo; <b>Q: HOW DO VISITORS DOWNLOAD PICTURES WHEN THEY ARE PURCHASED?</b></td>
</tr>
<tr>
    <td align="left" valign="top" style="padding:10px;" colspan="2" class="main">
    They don`t. Maian Gallery does not support downloadable images. The system is for photographers who want to sell and ship high quality images.
    </td>
</tr>
<tr>
    <td class="header" colspan="2" align="left">&raquo; <b>Q: CAN I CHANGE THE PREFIXES ADDED TO UPLOADED IMAGES?</b></td>

</tr>
<tr>
    <td align="left" valign="top" style="padding:10px;" colspan="2" class="main">
    Yes. See the options in the 'admin/inc/defined.inc.php' file.
    </td>
</tr>
<tr>
    <td class="header" colspan="2" align="left">&raquo; <b>Q: CAN I CHANGE THE THUMBNAIL DISPLAY SIZE IN THE ADMIN AREA?</b></td>
</tr>
<tr>
    <td align="left" valign="top" style="padding:10px;" colspan="2" class="main">
    Yes. See the options in the 'admin/inc/defined.inc.php' file.
    </td>
</tr>
<tr>
    <td class="header" colspan="2" align="left">&raquo; <b>Q: I CAN`T UPLOAD IMAGES. WHATS THE PROBLEM?</b></td>

</tr>
<tr>
    <td align="left" valign="top" style="padding:10px;" colspan="2" class="main">
    Most common problems are that the folders being written to are not writeable. You can also use your full server path
    by editing the option in the 'admin/inc/defined.inc.php' file.
    </td>
</tr>
<tr>
    <td class="header" colspan="2" align="left">&raquo; <b>Q: HOW DO I EDIT THE TEMPLATES?</b></td>
</tr>
<tr>
    <td align="left" valign="top" style="padding:10px;" colspan="2" class="main">
    A good quality text editor will be fine. Notepad will be ok if you have nothing else. A program like Microsoft Frontpage
    should be avoided at all costs as it will rewrite the HTML data and screw up the layout.
    </td>
</tr>
<tr>
    <td class="header" colspan="2" align="left">&raquo; <b>Q: CAN YOU RECOMMEND A GOOD FREE TEXT EDITOR?</b></td>

</tr>
<tr>
    <td align="left" valign="top" style="padding:10px;" colspan="2" class="main">
    Sure, the one I use is: <a href="http://www.pspad.com/en/" target="_blank" title="PSPad"><u>PSPad</u></a></td>
</tr>
<tr>
    <td class="header" colspan="2" align="left">&raquo; <b>Q: ARE THERE ANY ALTERNATIVES TO USING CURL?</b></td>
</tr>
<tr>
    <td align="left" valign="top" style="padding:10px;" colspan="2" class="main">
    There are, but they aren`t coded into Maian Gallery. If you don`t have CURL support, the payment system will not function.</td>
</tr>
<tr>
    <td class="header" colspan="2" align="left">&raquo; <b>Q: HOW DO I CREATE A THEME?</b></td>

</tr>
<tr>
    <td align="left" valign="top" style="padding:10px;" colspan="2" class="main">
    Click the 'Themes' link at the top of the page for more info.</td>
</tr>
<tr>
    <td class="header" colspan="2" align="left">&raquo; <b>Q: WHAT IS PHP?</b></td>
</tr>
<tr>
    <td align="left" valign="top" style="padding:10px;" colspan="2" class="main">
    See <a href="http://www.php.net" target="_blank" title="PHP.net"><u>PHP.net</u></a> for more info.</td>
</tr>
<tr>
    <td class="header" colspan="2" align="left">&raquo; <b>Q: CAN I STOP THE COMMENTS TEXT FROM WRAPPING?</b></td>

</tr>
<tr>
    <td align="left" valign="top" style="padding:10px;" colspan="2" class="main">
    By default comments are set to wrap after x amount of chars, to stop someone from screwing up the layout. To alter or disable this feature
    alter the word wrap text total in the 'inc/defined.inc.php' &amp; 'admin/inc/defined.inc.php' files. 0 disables the wrap.
    </td>
</tr>
<tr>
    <td class="header" colspan="2" align="left">&raquo; <b>Q: CAN I REMOVE THE COPYRIGHT IN THE SCRIPT?</b></td>
</tr>
<tr>
    <td align="left" valign="top" style="padding:10px;" colspan="2" class="main">
    Please see the <a href="http://www.maianscriptworld.co.uk/copyright-removal.html" title="Copyright Removal" target="_blank">Copyright Removal</a> page.<br><br>
    Note that the copyright removal fee is for the Maian Script World copyright notice only. If your theme has a template copyright, this must be left in place as per the licence of the free template. Contact the theme/template creator for more information.
    </td>
</tr>
<tr>
    <td class="header" colspan="2" align="left">&raquo; <b>Q: THE JAVASCRIPT ADVANCED SEARCH CALENDAR ISN`T LOADING. WHY?</b></td>
</tr>
<tr>
    <td align="left" valign="top" style="padding:10px;" colspan="2" class="main">
    There are a couple of reasons why this calendar will fail. Firstly, the language file has been edited incorrectly and the calendar vars are causing a javascript error. View your javascript error console or script debugger for more info.<br /><br />
    Another possible problem is the path isn`t being parsed correctly to the calendar javascript file. If this is the case, open the 'themes/*theme/js/calendar.js.php' file in your
    text editor and update the path at the top of the file. If your server is running in Safe Mode, this will most likely be the problem.<br><br>
    If you want to disable it, remove the 'onclick' tags from the date input fields in the 'themes/*theme/advanced_search.tpl.php' file and remove the js call in the header template.
    </td>
</tr>
<tr>
    <td align="right" valign="top" style="padding:10px;" colspan="2" class="main">
    <a href="#top"><img src="images/up.gif" border="0" alt="Back to Top" title="Back to Top"></a>
    </td>
</tr>
</table>
</td>
</tr>
</table>
</div>

<!-- Footer -->
<div id="footer">
	<p>Maian Gallery v2.0. Copyright &copy; 2006-<script type="text/javascript">var d = new Date(); document.write(d.getFullYear());</script> <a href="http://www.maianscriptworld.co.uk/free-php-scripts/maian-gallery/free-photo-gallery-system/index.html" title="Maian Script World">Maian Script World</a>. All Rights Reserved</p>
</div>
<!-- End Footer -->
</body>
</html>
Return current item: Maian Gallery