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 - jotabonfim

Pages: [1]
1
Hello good day!

I would like to make an implementation on my site, is a simple change, but as I am not a guy who dominates php, so I ask for help from you all.

The change would be in order to display the thumb within categories.

Example
When I click on the category of videos I'd like 4images exhibited thumbnail_bit_videos the file (for custom sizes of thumbnail videos)

When I click on the category of pictures I'd like 4images exhibited the thumbnail_bit_photos (custom sizes for thumbnail pictures)

Example 2:
If image_media_file =.flv
response.write (thumbnail_bit_videos)
Else
response.write (thumbnail_bit_photos)
End IF


This is possible, or my logic is wrong?

Thank you all if they can help.



//-----------------------------------------------------
I think the change should be on this page.....................................................................................
//--- Show Images -------------------------------------
//--------------------------------------...................---------------
$site_template->register_vars(array(
  "has_rss"   => true,
  "rss_title" => "RSS Feed: ".format_text($cat_cache[$cat_id]['cat_name'], 2)." (".str_replace(':', '', $lang['new_images']).")",
  "rss_url"   => $script_url."/rss.php?action=images&".URL_CAT_ID."=".$cat_id
));

$num_rows_all = (isset($cat_cache[$cat_id]['num_images'])) ? $cat_cache[$cat_id]['num_images'] : 0;
$link_arg = $site_sess->url(ROOT_PATH."categories.php?".URL_CAT_ID."=".$cat_id);

include(ROOT_PATH.'includes/paging.php');
$getpaging = new Paging($page, $perpage, $num_rows_all, $link_arg);
$offset = $getpaging->get_offset();

$site_template->register_vars(array(
  "paging" => $getpaging->get_paging(),
  "paging_stats" => $getpaging->get_paging_stats()
));

$imgtable_width = ceil((intval($config['image_table_width'])) / $config['image_cells']);
if ((substr($config['image_table_width'], -1)) == "%") {
  $imgtable_width .= "%";
}

$additional_sql = "";
if (!empty($additional_image_fields)) {
  foreach ($additional_image_fields as $key => $val) {
    $additional_sql .= ", i.".$key;
  }
}

$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")."
        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_active = 1 AND i.cat_id = $cat_id AND c.cat_id = i.cat_id
        ORDER BY ".$config['image_order']." ".$config['image_sort'].", i.image_id ".$config['image_sort']."

        LIMIT $offset, $perpage";
$result = $site_db->query($sql);
$num_rows = $site_db->get_numrows($result);

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

    show_image($image_row);
    $thumbnails .= $site_template->parse_template("thumbnail_bit");

    $thumbnails .= "\n</td>\n";

    $count++;
    if ($count == $config['image_cells']) {
      $thumbnails .= "</tr>\n";
      $count = 0;
    }
  } // end while

  if ($count > 0)  {
    $leftover = ($config['image_cells'] - $count);
    if ($leftover > 0) {
      for ($i = 0; $i < $leftover; $i++){
        $thumbnails .= "<td width=\"".$imgtable_width."\">\n&nbsp;\n</td>\n";
      }
      $thumbnails .= "</tr>\n";
    }
  }
  $thumbnails .= "</table>\n";
} //end else
$site_template->register_vars("thumbnails", $thumbnails);
unset($thumbnails);

2
Mods & Plugins (Releases & Support) / [MOD] Latest 5 videos on Home-Site
« on: August 07, 2009, 12:54:46 AM »
Hi good evening, I would like to know how to select which showed in the last 5 home videos sent to the site.

Example: Select from where image_media_file = .flv

I want to display the thumb and the video link to view it.

Somebody could help me please!

3
Hello boys, opening this topic because I'm having trouble using this module.

My site has several videos by category and I am receiving the following error in response to other videos.

<script type='text/javascript' src='swfobject.js'></script>

<div id='mediaspace'>This div will be replaced</div>


<script type='text/javascript'>
  var s1 = new SWFObject('player.swf','ply','470','320','9','#ffffff');
  s1.addParam('allowfullscreen','true');
  s1.addParam('allowscriptaccess','always');
  s1.addParam('wmode','opaque');
  s1.addParam('flashvars','file=<?=urlencode("{media_src}")?>&autostart=true');
  s1.write('mediaspace');
</script>

What is the problem?

Please need help.

Thanks

4
Hello, someone could help me, I would like to add index.php page in a new code to display only the photos a new category of Specifies example: select * from 4images_images where cat_id = 'x'

In other words I want to put more pictures on the main page, but it has to be a specific category.

Or maybe change this code to display only the category chosen

Who knows how to do this?

I am grateful for the help
 :lol:

//-----------------------------------------------------
//--- Show New Images ---------------------------------
//-----------------------------------------------------
$site_template->register_vars(array(
  
"has_rss"   => true,
  
"rss_title" => "RSS Feed: ".format_text($config['site_name'], 2)." (".str_replace(':'''$lang['new_images']).")",
  
"rss_url"   => $script_url."/rss.php?action=images"
));
$imgtable_width ceil(intval($config['image_table_width']) / $config['image_cells']);
if ((
substr($config['image_table_width'], -1)) == "%") {
  
$imgtable_width .= "%";
}
$additional_sql "";
if (!empty(
$additional_image_fields)) {
  foreach (
$additional_image_fields as $key => $val) {
    
$additional_sql .= ", i.".$key;
  }
}
$num_new_images $config['image_cells']*3;
$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")."
        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_active = 1 AND c.cat_id = i.cat_id AND i.cat_id NOT IN ("
.get_auth_cat_sql("auth_viewcat""NOTIN").")
                AND i.image_date >= "
.(time() - 60 60 24 $config['new_cutoff'])."
ORDER BY RAND()
LIMIT 
$num_new_images";
$result $site_db->query($sql);
$num_rows $site_db->get_numrows($result);
if (!
$num_rows)  {
  
$new_images "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\"><tr class=\"imagerow1\"><td>";
  
$new_images .= $lang['no_new_images'];
  
$new_images .= "</td></tr></table>";
}
else  {
  
$new_images "<table 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++ % == 0) ? 2;
      
$new_images .= "<tr class=\"imagerow".$row_bg_number."\">\n";
    }
    
$new_images .= "<td width=\"".$imgtable_width."\" valign=\"top\">\n";
    
show_image($image_row);
    
$new_images .= $site_template->parse_template("thumbnail_bit");
    
$new_images .= "\n</td>\n";
    
$count++;
    if (
$count == $config['image_cells']) {
      
$new_images .= "</tr>\n";
      
$count 0;
    }
  } 
// end while
  
if ($count 0)  {
    
$leftover = ($config['image_cells'] - $count);
    if (
$leftover >= 1) {
      for (
$f 0$f $leftover$f++) {
        
$new_images .= "<td width=\"".$imgtable_width."\">\n&nbsp;\n</td>\n";
      }
      
$new_images .= "</tr>\n";
    }
  }
  
$new_images .= "</table>\n";
// end else
$site_template->register_vars("new_images"$new_images);
unset(
$new_images);

5
Hello boys, I would like to know if a module where I can control the amount of letters that the user types in time to make him the register on the site.
Example: the user would have to enter at least 5 letters to make the register and no more than 12 letters.

6
Mods & Plugins (Requests & Discussions) / Mod More thumb in details.php
« on: September 18, 2008, 08:00:34 PM »
Hello someone knows where I used the module on this site.
I want to display 4 thunb page in detail below the photo.

Example: http://souwar.yaacoub.com/details.php?image_id=35748

7
Assuming you are using 4images v1.7.2 or newer. In login.php find:
Code:
  if ($site_sess->login($user_name, $user_password, $auto_login)) {

Insert BELOW:
Code:
    redirect($site_sess->url(ROOT_PATH."member.php?action=editprofile"));
------------------------------------------------------------------------------------------------------------------------------------------------
Hello Vano you for this module, it will be very useful for users of my country because the laws.

I need one more help to implement more about this module.
I use version 1.7.6

I need that after the user login it is redirected to a page with some information, after he read this page and agree he should click button agreeing with what this writing there.

When they click on the site will update the table "4images_user" with information on more in a field that created called "user_communicate" after this he would be redirected to index.php.
Next visit the user back to the site, where the "user_communicate" is marked with "yes" he vera again this message.

Example: If the same field user_communicate yes, redirect index.php
if not redirect page_communicate.php and update table 4iamges_users September field user_communicate "yes" or "no"


This is possible?  :D

I am grateful for the help.

8
Mods & Plugins (Requests & Discussions) / Mod Limit of comment by photos
« on: September 15, 2008, 07:04:52 PM »
Hello boys!
I am stating put a limit on comments by photos.
This would be possible?

EX: for each photo posted in the gallery it would have a limit of 25 comments, after 25 comments would not be possible to make more comments on the picture.

I am grateful if they can help.
 :D

9
Good day! :D

I need the module of control of "user upload limit". The available version in fórum does not function correctly, has several bug and it is not trustworthy.

Information:
Version that use of 4images: 1.7.4
MYSQL: 5.0


Who will be interested to send email for me.

10
Mods & Plugins (Requests & Discussions) / Dating site = 4images!
« on: January 18, 2007, 03:20:09 PM »
Hi I have a referring doubt to the system 4images.
It would be possible to transform it into dating site?
I need to construct a search system, that makes search for the sex, age and city. He will be that he is possible?

I am thankful for the aid  :lol:

11
Mods & Plugins (Requests & Discussions) / Show image in show profile
« on: July 01, 2006, 03:34:38 PM »
Hi as I do to exhibit user's images on the page /member.php?action=showprofile&user_id

See this example: [color=Blue]http://www.photochart.com/S.%20Pessolano.cfm[/color]

 :D :D :flag-en:

12
Is MOD PM incompatible with 4images version 1.7.2?
Hi boys!
I installed the module Private Message and is not working correctly, already did the reading of almost the whole forum in search of solution did not find most.

I need help

Pages: [1]