Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - uae

Pages: [1]
1
To have the Server Date and Time,

Add this line in your details.php

Code: [Select]
   $current_time = time();

Befor this

Code: [Select]

    include(ROOT_PATH.'includes/email.php');
    $site_email = new Email();
    $site_email->set_to($recipient_email);
    $site_email->set_from($config['site_email'], $config['site_name']);
    $site_email->set_subject("Comment Posted");
$site_email->set_subject($lang['send_comment_emailsubject']);
    $site_email->register_vars(array(
      "user_name" => $image_row['user_name'],
      "recipient_name" => $recipient_name,
      "image_name" => $image_row['image_name'],
      "comment_date" => format_date($config['date_format']." ".$config['time_format'], $current_time),
      "site_name" => $config['site_name'],
      "image_url" => $image_url,
          ));
    $site_email->set_body("comment_email", $config['language_dir']);
    $site_email->send_email();


So it should look like

Code: [Select]
           
    $current_time = time();
    include(ROOT_PATH.'includes/email.php');
    $site_email = new Email();
    $site_email->set_to($recipient_email);
    $site_email->set_from($config['site_email'], $config['site_name']);
    $site_email->set_subject("Comment Posted");
$site_email->set_subject($lang['send_comment_emailsubject']);
    $site_email->register_vars(array(
      "user_name" => $image_row['user_name'],
      "recipient_name" => $recipient_name,
      "image_name" => $image_row['image_name'],
      "comment_date" => format_date($config['date_format']." ".$config['time_format'], $current_time),
      "site_name" => $config['site_name'],
      "image_url" => $image_url,
          ));
    $site_email->set_body("comment_email", $config['language_dir']);
    $site_email->send_email();


Good Luck

2
Mods & Plugins (Requests & Discussions) / PHP Guestbook integration!
« on: October 21, 2002, 10:31:29 AM »
Hello there,

Is there any good PHP guestbook that I can integrate with 4Images?

Thanx

3
Language Packs / [Language] Arabic language files
« on: September 10, 2002, 09:06:51 AM »
Here is a translation files in Arabic,

I have done the main.php, email files, and the images, but not the admin nor the installation part.

http://www.myuae.com/myalbum/4images_arabic.zip

4
Hi there,

Sorry, I haven't mentioned this, but I have placed the php file with the forms under the templates dir.

in your case, 4images/templates/choise.php

Good Luck.

5
Chit Chat / Next version of 4images
« on: August 15, 2002, 07:06:51 AM »
Hey Jan,

If you can add a slide show to the next version.

Keep up the good work  :D

6
Here is what you need to do,

first,
find the following in the global.php

Code: [Select]
//-----------------------------------------------------
//--- Generate Setting --------------------------------
//-----------------------------------------------------
$sql = "SELECT setting_name, setting_value
        FROM ".SETTINGS_TABLE;
$result = $site_db->query($sql);
if (!$result) {
  echo $lang['no_settings'];
  exit;
}
while ($row = $site_db->fetch_array($result)) {
  $config[$row['setting_name']] = $row['setting_value'];
}
$site_db->free_result();


Then add the following

Code: [Select]
// registering global variable "user_template"

if (!isset($user_template))
   session_register("user_template");

// check global variable for Empty

 if ($user_template=="" || empty($user_template))
   $user_template = $config['template_dir'];


// set the Template if QueryString is not nothing
if (!empty($t) || $t != "")
 $user_template = $t;  

  $config['template_dir'] = $user_template;


it should look like this.

Code: [Select]
//-----------------------------------------------------
//--- Generate Setting --------------------------------
//-----------------------------------------------------
$sql = "SELECT setting_name, setting_value
        FROM ".SETTINGS_TABLE;
$result = $site_db->query($sql);
if (!$result) {
  echo $lang['no_settings'];
  exit;
}
while ($row = $site_db->fetch_array($result)) {
  $config[$row['setting_name']] = $row['setting_value'];
}

[b]// registering global variable "user_template"

if (!isset($user_template))
   session_register("user_template");

// check global variable for Empty

 if ($user_template=="" || empty($user_template))
   $user_template = $config['template_dir'];


// set the Template if QueryString is not nothing
if (!empty($t) || $t != "")
 $user_template = $t;  

  $config['template_dir'] = $user_template;
[/b]
$site_db->free_result();


The second thing, I've created a new php page with two forms of drop down list, one form was for the languages, and the other was for the templates, then I included this page to every template's header file.

This is the new php file I've created.

Code: [Select]
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="640" align="center">
  <tr>
    <form>
    <td width="50%" align="left">
    <select name="select_template" onChange="javascript:if(options[selectedIndex].value!='0') document.location.href=options[selectedIndex].value; ">
 <option value="0">Select a Template</option>
<?php
$t_link $_SERVER['QUERY_STRING'];
$t_link preg_replace("/&{0,1}l=[a-z\.]{1,25}/"""$t_link);
$t_link "?".$t_link;
$t_link $_SERVER['PHP_SELF'].$t_link."&t=";
  

$folderlist = array();
$handle opendir(ROOT_PATH."templates");

while ($folder = @readdir($handle)) {
  if (@is_dir(ROOT_PATH."templates/$folder") && $folder != "." && $folder != ".." && $folder != "_vti_cnf" ) {
    $folderlist[] = $folder;
  }
}
closedir($handle);
foreach ($folderlist as $folder) {
$templink $t_link.$folder;
?>

 <option value="<?php echo $templink; ?>"><? echo $folder ?></option>
             <?php
}
?>

</select>
   
    </td>
    </form>
    <form>
    <td width="50%" align="right">
    <select name="select_language" onChange="javascript:if(options[selectedIndex].value!='0') document.location.href=options[selectedIndex].value; ">
 <option value="0">Select a Language</option>

<?php
$l_link $_SERVER['QUERY_STRING'];
$l_link preg_replace("/&{0,1}l=[a-z\.]{1,25}/"""$l_link);
$l_link "?".$l_link;
$l_link $_SERVER['PHP_SELF'].$l_link."&l=";

$folderlist = array();
$handle opendir(ROOT_PATH."lang");
while ($folder = @readdir($handle)) {
  if (@is_dir(ROOT_PATH."lang/$folder") && $folder != "." && $folder != ".." && $folder != "_vti_cnf" ) {
    $folderlist[] = $folder;
  }
}
closedir($handle);
foreach ($folderlist as $folder) {
$langlink $l_link.$folder;
?>

 <option value="<?php echo $langlink; ?>"><? echo $folder ?></option>

             <?php
}
?>

   
    </td>
    </form>
  </tr>
</table>



Please do report bugs to me.

Good Luck

7
:D

Grrrr8 news, check this out, I've got this done I guess...

Now any visitor to your 4images can select between templates.


http://www.myuae.com/myalbum/


+++++++++++++

8
Hi,

I've got more than one template, and I was wondering if I can have a link or a drop down list of all the templates I've got and let my visitors to 4images choose between templates.

9
Done.

10
opps Jan, but there is a link in the footer, is that ok, or I need to place it at the buttom of the page?

11
Hey, here, I'm interested too.

my email is
myuae@myuae.com

12
Mods & Plugins (Requests & Discussions) / Arabic Language Version
« on: July 30, 2002, 07:23:17 AM »
Here is an Arbic version of the 4images.

http://www.myuae.com/myalbum/

There is a trick about the Arabic Version, the pages direction should load from right to left.
So, I'm using the dir="rtl" in the body tag of the header.html file.

 :) awesome product.

Pages: [1]