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.


Topics - Sun Zaza

Pages: 1 2 3 4 5 [6] 7
76
Hi,

I did a lot of work to have a related images on the details page, but there is a small conflict in this page.

I explain:

On my galery I have 2 gategories:
1- videos of the soccer players
2- Foto's of the soccer players

For example:
I have 4 videos of RONALDINHO en one (1) foto for this player

On the details.html of the foto of RONALDINHO I want to show also all his video's under (Thumbs ofcourse).

I added a new database field: image_player
That means the name of the player.

I used this code on the details.php:

Code: [Select]
//-----------------------------------------------------
//----------------------------------------BEGIN SHOW RELATED PLAYER IMAGES----------------------------------------------
//-----------------------------------------------------

 $image_speler = format_text($image_row['image_speler'], 2);

 $image_name = format_text($image_row['image_name'], 2);
 //i.image_speler = '$image_name'

$sql = "SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits".$additional_sql.", c.cat_name".get_user_table_field(", u.", "user_name").get_user_table_field(", u.", "user_email")."
        FROM (".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c)
        LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = i.user_id)
        WHERE i.image_player = '$image_name'
        GROUP BY i.image_id
        ORDER BY i.image_name ASC";     
       
 
       
$result = $site_db->query($sql);
$num_rows = $site_db->get_numrows($result);


if (!$num_rows)  {
  $related_speler_images = "<table class=\"head3\" width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\"><tr class=\"imagerow1\"><td>";
  $related_speler_images .= $lang['no_videos'];
  $related_speler_images .= "</td></tr></table>";
}
else  {
  $related_speler_images = "<table class=\"video_bekeken\" width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\">";
  $count = 0;
  $bgcounter = 0;
  while ($image_row = $site_db->fetch_array($result)){
    if ($count == 0) {
      $row_bg_number = ($bgcounter++ % 2 == 0) ? 1 : 2;
      $related_speler_images .= "<tr class=\"video_bekeken\">\n";
    }
    $related_speler_images .= "<td width=\"".$imgtable_width."\" valign=\"top\">\n";

    show_image($image_row);
       
    $related_speler_images .= $site_template->parse_template("thumbnail_bit");
    $related_speler_images .= "\n</td>\n";
    $count++;
    if ($count == $config['image_cells']) {
      $related_speler_images .= "</tr>\n";
      $count = 0;
    }
  } // end while
 
  if ($count > 0)  {
    $leftover = ($config['image_cells'] - $count);
    if ($leftover >= 1) {
      for ($f = 0; $f < $leftover; $f++) {
        $related_speler_images .= "<td width=\"".$imgtable_width."\">\n&nbsp;\n</td>\n";
      }
      $related_speler_images .= "</tr>\n";
    }
  }
  $related_speler_images .= "</table>\n";

}

$site_template->register_vars("related_speler_images", $related_speler_images);
unset($related_speler_images);
//-----------------------------------------------------
//----------------------------------------END SHOW RELATED PLAYER IMAGES----------------------------------------------
//-----------------------------------------------------


More explaination:

Code: [Select]
WHERE i.image_player = '$image_name'
That means that the code see first the name of the image (foto): RONALIDNHO and then it wil get all the related images who has: i.image_player = RONALDINHO.


This code works almost perfect, but there is a problem:

1- If I use this code in the begining of the details.php, you get to see: The wright image + the wrong related videos.

2- If I use this code in the end of the details.php, you get to see: The wrong image + the WRIGHT related videos (Thumbs)


Thank you in advance,
Cruxy

77
Mods & Plugins (Requests & Discussions) / Comments for an costum page
« on: January 31, 2008, 07:57:32 PM »
Hi everybody,

I want to add 4images comments (Like on details.html) on custom pages?
How can I do that?

Thank you in advance,

Cruxy

78
Hi,

I have a problem in adding a definded related image.

On the details.html you find a random_image. For some reason I want to add under a definded related image.
That means that on the ACP (ADMIN AREA) (EDIT IMAGE) you defind the image_id you want to show under the random image.

I will explain:

I added a new field on the database (image_related).
On the ACP (EDIT IMAGE) I put in this field: 100 (100 is the image_id I want to show under the RANDOM IMAGE)

On the DETAILS.PHP I used this code:

Code: [Select]
//-----------------------------------------------------
//----------------------------------------Related image----------------------------------------------
//-----------------------------------------------------


 
 $image_related = $image_row['image_related'];

 $sql = "SELECT i.image_id, i.image_related, i.image_thumb_file, i.image_media_file, i.cat_id, i.user_id, i.image_name, i.image_date, i.image_active, i.image_hits".$additional_sql.", c.cat_name".get_user_table_field(", u.", "user_name")."
        FROM (".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c)       
        LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = i.user_id)
        WHERE i.image_id = $image_related
        GROUP BY i.image_id
        ORDER BY i.image_id ASC";         
       
$result = $site_db->query($sql);
$num_rows = $site_db->get_numrows($result);


if (!$num_rows)  {
  $related_images = "<table class=\"head3\" width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\"><tr class=\"imagerow1\"><td>";
  $related_images .= $lang['empty'];
  $related_images .= "</td></tr></table>";
}
else  {
  $related_images = "<table class=\"video_bekeken\" width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\">";
  $count = 0;
  $bgcounter = 0;
  while ($image_row3 = $site_db->fetch_array($result)){
    if ($count == 0) {
      $row_bg_number = ($bgcounter++ % 2 == 0) ? 1 : 2;
      $related_images .= "<tr class=\"video_bekeken\">\n";
    }
    $related_images .= "<td width=\"".$imgtable_width."\" valign=\"top\">\n";

    show_image($image_row3);
       
    $related_images .= $site_template->parse_template("thumbnail_bit");
    $related_images .= "\n</td>\n";
    $count++;
    if ($count == $config['image_cells']) {
      $related_images .= "</tr>\n";
      $count = 0;
    }
  } // end while
 
  if ($count > 0)  {
    $leftover = ($config['image_cells'] - $count);
    if ($leftover >= 1) {
      for ($f = 0; $f < $leftover; $f++) {
        $related_images .= "<td width=\"".$imgtable_width."\">\n&nbsp;\n</td>\n";
      }
      $related_images .= "</tr>\n";
    }
  }
  $related_images .= "</table>\n";

}

$site_template->register_vars("related_images", $related_images);
unset($related_images);
//-----------------------------------------------------
//--------------------------------------------------------------------------------------------------------------------
//-----------------------------------------------------

I get a rare results:

In the place of {related_images} I get all the images of the datafield (image_related) and also shows the galery only the latest picture.
So I you have 1000 images on the galery, the users will see only one.

I really need help.

Please if you need more expaination, I will give you more details.

Thank you in advance,
Cruxy

79
Installation, Update & Configuration / Update to 1.7.5 with MODS
« on: January 30, 2008, 09:58:02 PM »
Hello,

I want to update my galery from 1.7.4 to 1.7.5, but I have a lot of mods in my scripts.

How can I do that?

(PHPBB has always an update file for people who use Mods).

Thank you in advance,
Cruxy

80
Mods & Plugins (Requests & Discussions) / Count image_keywords
« on: December 18, 2007, 07:56:37 PM »
Hi,

How can I count the imgae_keywords for each image.
I want something like:
Keywords (3): Keyword1, Keyword2, Keyword3

Thank you in advance for any help  :)
 

81
Chit Chat / thunderstrike, cruxy
« on: November 29, 2007, 10:21:28 PM »
Is here on this forum someone serious who want to help me in this matter!

82
Hello Guru's :)

I added a new table (4images_events) to my galery and also the events.php file.
At moment I am using it on some custom page, but I do not like it any more because everytime I have to make a new php file for every new event.

I want to use something like www.mysite.com/event.php?events_id=4 instead of www.mysite.com/event4.php

Can you give me please an idea how to do that. I will try it myself.

NOTE: I spent more than 5 hours to see how it works details.php and categery.php, but no luck yet :x

Many thanks in advance,
Cruxy

83
Mods & Plugins (Requests & Discussions) / How to upload MP3 to the gallery
« on: November 25, 2007, 02:16:27 AM »
Hello guys,

I want to upload some MP3's via ACP to the folder MP3 on my galery to use it on details.php.

I already add the colomn image_mp3 to the database (image table).

Does someone knows a code to upload some MP3's to the images table using ACP?
Thank you in advance for your help.
Cruxy

84
Discussion & Troubleshooting / (isset(..)) gives wrong results!!!!!
« on: November 25, 2007, 01:47:35 AM »
Hi,
I have an little issue:

I have a 1 foto, fotoYES.jpg in the folder foto on my gallery.

On the php page I use this code:

Code: [Select]
$fotoYES = $site_sess->url("http://www.website.com/foto/fotoYES.jpg");
$fotoNO = $site_sess->url("http://www.website.com/foto/fotoNO.jpg");

$painFOTO = $site_sess->url("http://www.website.com/foto/spainFOTO.jpg"); //This foto DOES NOT EXIST

$foto = (isset($painFOTO)) ? $fotoYES : $fotoNO;

That means if spainFOTO.jpg exist, the result will be $fotoYES, OTHERWISE $fotoNO.

I don't understand why the result always $fotoYES even spainFOTO.jpg not in the folder foto.

I think I should use another code instead of (isset(....)) ? ..:...;

NOTE: http://www.website.com/foto/spainFOTO.jpg give an 404 error! (spainFOTO.jpg does not exist in the folder foto)

Any help will be great,
Cruxy


85
Hi guys,

I just bought 2 books to start learnig PHP. I love it! But till then I need some suppot from you.

Because my motto is Nothing is perfect, I decide to improve daily my gallery. So I have an Idea, but I need your help:

I want to store in the database all thing I want to change in the gallery, otherwise I will forget it.

I added a new table 4images_todo in the database and two column stuff_todo and stuff_done.
With phpMyadmin I insert some information to test it. It is working fine.

I also could use it on my custom page (Thanks to mawenzi and Thunderstrike).

To be perfect I want to add the information from ACP. This is the big problem!
I already add thing todo, add thing todo and delete thing todo to the navigation. And now I stuk.

I need the file todo.php in admin to use /admin/todo.php?action-addtodo and /admin/todo.php?action-modifytodo

I just want to store some information in the database via ACP in two fields. :?

Many thank in advance,
Cruxy

86
Hi guys, I have a very difficult request to you:

On my custom page (page1.php) I want to use this tags:

{image_name} {image_hits}. I expected the result, because it turn the value randomly.

Is it possible (of course possible :wink:) to use something like {image_name_id} (just a example)?. You give yourself the image ID value so that the tag {image_name} understand that the result will be the name of the image (image_id).

Many thanks in advance,
Cruxy


87
Hi guys,

I just realize today that the tag {user_id} in member_editprofile.html not working properly.
It return always the value: 1 (of admin).
I try it also on a fresh gallery (Without mod).
How can I make {user_id} showing the right ID value of the user on member_editprofile.html .

Actualy I want to use it with:
Code: [Select]
<a href="/member.php?action=showprofile&user_id={user_id}">My profile</a>
NOTE: The tag {user_id} is returning the right value in member_profile.html

Many thanks in advance, :)
Cruxy

88
Hi guys,

I added some text to the member_profile.html (For example: Welkom {user_name} to your profile page).
I want to show this text only to the owner of the profile page.
If someone else is visiting this member page, will get another text:
(For example: Welkom to the profile page of...)

What do I have to do to use: {if..............} text1 {endif..............} {ifnot..............} text2 {endifnot..............}

Many thanks in advance for any help,
Cruxy


89
Hi guys,

I am again with a new usefull question: :idea:

On the user_logininfo.html I add a link to a page on my gallery.

I want that this link just showing to the usergroup Photographer. If you are not from the usergroup Photographer, you will see nothing.

Many thanks in advance, :)
Cruxy

90
Hi guys,

I have the hole day problems with my gallery and now I have to solve something difficult for me:

I add two image additional fields:
{date_start} and {date_end}
Both are working fine on details.html

First question:
I want to add a new array {date2}
{date2}= {date_end} - {date_start}
I want the answer in days

Second question:
I want to add a new array {date3}
{date3}= today - {date_start}
I want the answer also in days

It is now midnight and I can not sleep because this issue. :cry:

Many thanks in advance for any help and/or explain,
Cruxy

Pages: 1 2 3 4 5 [6] 7