Author Topic: Missing MODs/FIXes/FAQs (Updated 19-07-2005 21:10 EST)  (Read 104461 times)

0 Members and 1 Guest are viewing this topic.

Offline impss

  • Sr. Member
  • ****
  • Posts: 382
    • View Profile
    • Cusstom.net
Re: Missing MODs/FIXes/FAQs (Updated 15-03-2004 03:00 EST)
« Reply #15 on: March 15, 2005, 07:05:58 PM »
Post subject: [Bug Fix] Database backup fails in Mozilla and Firefox   

Code: [Select]
V@no



Joined: 17 Jul 2002
Posts: 7348
Location: St. Petersburg, FL, RUSSIA-LATVIA
 Posted: 25.07.2004, 06:35    Post subject: [Bug Fix] Database backup fails in Mozilla and Firefox   

--------------------------------------------------------------------------------
 
dmair wrote:
OK, this is scary! I just tried to do a database backup before archiving my 4Images content and it failed (with all the error info in the .sql file). All the SQL statements had no table name in them. It was caused by a missing equals sign in backup.php where it generates the value attribute for the option tag in the form's select element that contains the table list:

Code:

  $result = $site_db->query("SHOW tables");
  while ($row = $site_db->fetch_array($result)) {
    $table_select .= "<option value\"".$row[0]."\"";
    if (in_array($row[0], $default_tables) && preg_match("/^".$table_prefix."/i", $row[0])) {
      $table_select .= " selected";
    }
    $table_select .= ">".$row[0]."</option>\n";
  }
 


should look like this:

Code:

  $result = $site_db->query("SHOW tables");
  while ($row = $site_db->fetch_array($result)) {
    $table_select .= "<option value=\"".$row[0]."\"";
    if (in_array($row[0], $default_tables) && preg_match("/^".$table_prefix."/i", $row[0])) {
      $table_select .= " selected";
    }
    $table_select .= ">".$row[0]."</option>\n";
  }
 


Before I figured out the cause I downloaded the published 4Images and compared the files with my own copies (I use the same version with a few mods). The equals sign is missing on the version I just downloaded.

What I find weird is that I think backup used to work! Until today I had backups of around 4000kB, today I made one and it was 8.6kB and really only a list of error messages from MySQL
 
 

Offline impss

  • Sr. Member
  • ****
  • Posts: 382
    • View Profile
    • Cusstom.net
Re: Missing MODs/FIXes/FAQs (Updated 15-03-2004 03:00 EST)
« Reply #16 on: March 15, 2005, 07:10:11 PM »
Post subject: [FIX] Cant upload images when not cat_id specifyed   

Code: [Select]
V@no



Joined: 17 Jul 2002
Posts: 5342
Location: Atlanta, GA, RUSSIA-LATVIA
 Posted: 29.05.2003, 14:27    Post subject: [FIX] Cant upload images when not cat_id specifyed   

--------------------------------------------------------------------------------
 
When u go to http://yoursite.com/4images/member.php?action=uploadform it will show u list of categories avalable for upload.
Even if u select a category, it wont let u upload and show u error message "Please select a category".
To fix that, open /templates/<yourtemplate>/member_uploadform.html
Find:Code:
<input type="hidden" name="cat_id" value="{cat_id}" />

Replace with:Code:
{if cat_id}<input type="hidden" name="cat_id" value="{cat_id}" />{endif cat_id}
 
 

Offline impss

  • Sr. Member
  • ****
  • Posts: 382
    • View Profile
    • Cusstom.net
Re: Missing MODs/FIXes/FAQs (Updated 16-03-2004 08:18 EST)
« Reply #17 on: March 16, 2005, 03:55:59 PM »
Thats all the ones I could find that Chris asked for.



Offline Chris

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.487
  • Did u ever stop to think and then forget to start?
    • View Profile
Re: Missing MODs/FIXes/FAQs (Updated 16-03-2004 08:18 EST)
« Reply #18 on: March 16, 2005, 06:06:08 PM »
Big thanks for the help!  I found a bunch of them already and reposted them to the bug fix forum last night.  Thanks again

Offline Jannis

  • Newbie
  • *
  • Posts: 26
    • View Profile
    • MannSbilder
Re: Missing MODs/FIXes/FAQs (Updated 16-03-2004 08:18 EST)
« Reply #19 on: March 16, 2005, 07:22:58 PM »
Mod: "Admin Levels / moderators" fehlt noch.
Die alte Url dieses Mods lautete: http://www.4homepages.de/forum/viewtopic.php?t=10756
Leider weiß ich auch nicht mehr wer dieses Mod geschrieben hatte.

------------------------english-------------------------------

The mod 'Admin Levels / moderators'. is missing.
The old URL of this mod was: http://www.4homepages.de/forum/viewtopic.php?t=10756

Offline Vincent

  • 4images Moderator
  • Addicted member
  • *****
  • Posts: 1.195
    • View Profile
    • www.foto-kocher.com
Re: Missing MODs/FIXes/FAQs (Updated 16-03-2004 08:18 EST)
« Reply #20 on: March 17, 2005, 09:34:07 AM »
missing MOD -  but wrote a mail to rproctor - and asked to publish again  :wink:

[MOD COMPLETE] Show newest images in main cat from sub cat.

 :roll: 8)
Vincent
Beati pauperi spiritus

4images 1.7 // My Installed Mods


Offline Sheon

  • Jr. Member
  • **
  • Posts: 51
    • View Profile
Re: Missing MODs/FIXes/FAQs (Updated 16-03-2004 08:18 EST)
« Reply #21 on: March 17, 2005, 03:03:40 PM »
This is mod for protect images. But I am don't remember name. :( (Author - Vano)

Code: [Select]
http://4homepages.de/forum/viewtopic.php?p=40247#40247

I just wanted to share with the public with another way to secure pictures, that I made long time ago and successfuly have been using on my site. It hides location of the pictures and adds antileech as well.

Step 1.
Open /includes/functions.php
Find:
Code:
function show_image($image_row, $mode = "", $show_link = 1, $detailed_view = 0) {

Replace with:
Code:
function show_image($image_row, $mode = "", $show_link = 1, $detailed_view = 0, $encrypt = 0) {


Step 1.2.
Find:
Code:
    "image" => get_media_code($image_row['image_media_file'], $image_row['image_id'], $image_row['cat_id'], $image_row['image_name'], $mode, $show_link, $detailed_view),

Replace with:
Code:
    "image" => get_media_code($image_row['image_media_file'], $image_row['image_id'], $image_row['cat_id'], $image_row['image_name'], $mode, $show_link, $detailed_view, $encrypt),


Step 1.3.
Find:
Code:
function get_media_code($media_file_name, $image_id = 0, $cat_id = 0, $image_name = "", $mode = "", $show_link = 0, $detailed_view = 0) {

Replace with:
Code:
function get_media_code($media_file_name, $image_id = 0, $cat_id = 0, $image_name = "", $mode = "", $show_link = 0, $detailed_view = 0, $encrypt = 0) {


Step 1.4.
Find:
Code:
      "media_src" => $media_src,

Replace with:
Code:
      "media_src" => ($encrypt) ? ROOT_PATH."show.php?pic=".encrypt_add($media_src) : $media_src,
      "media_src_original" => $media_src,


Step 1.5.
At the end of the file, just before closing ?> insert:
Code:
function encrypt_add($file){
  global $_SESSION;
  @session_name('4images_pic');
  @session_start();
  $file = base64_encode($file);
  $id = md5(uniqid(microtime()));
  $_SESSION['4images_pic'] = $id." ".$file." ".time();
  return $id;
}


Step 1.6. (added 10/15/2004)
If u installed [MOD] Show original image in new window by clicking on image
then also u'll need do this:
Find:
Code:
    "media_src_big" => get_media_code($image_row['image_media_file'], $image_row['image_id'], $image_row['cat_id'], $image_row['image_name'], $mode, $show_link, $detailed_view, 1),

Replace it with:
Code:
    "media_src_big" => get_media_code($image_row['image_media_file'], $image_row['image_id'], $image_row['cat_id'], $image_row['image_name'], $mode, $show_link, $detailed_view, 1, 1),

Also Step 1.2 and Step 1.3. has to be changed for u:
in Step 1.2 use this line:
Code:
function get_media_code($media_file_name, $image_id = 0, $cat_id = 0, $image_name = "", $mode = "", $show_link = 0, $detailed_view = 0, $big=0, $encrypt = 0) {
and in Step 1.3 this:
Code:
    "image" => get_media_code($image_row['image_media_file'], $image_row['image_id'], $image_row['cat_id'], $image_row['image_name'], $mode, $show_link, $detailed_view, $big, $encrypt),



Step 2.
Open /details.php
Find:
Code:
show_image($image_row, $mode, 0, 1);

Replace with:
Code:
show_image($image_row, $mode, 0, 1, 1);



Step 3.
Create a new file and save it as show.php in 4images root dir, with this code:
Code:
<?php 
//-----------------------------------------------------\\ 
//--- Created by V@no ©2003 http://gallery.vano.org ---\\ 
//-----------------------------------------------------\\ 

//---- Settings -------- 
$expire 35//seconds 
$reduce 20//reduce expire time after first call 
//-- End Settings ------ 

define('ROOT_PATH''./'); 
include(
ROOT_PATH.'includes/upload_definitions.php'); 
@
session_name('4images_pic'); 
@
session_start(); 
function 
is_remote_file($file_name) { 
  return (preg_match("#^(https?:\/\/[a-z0-9\-]+?\.([a-z0-9\-]+\.)*[a-z]+(:[0-9]+)*\/.*?\.([a-z]{1,4})$)#is"$file_name)) ? 0


function 
get_file_extension($file_name) { 
  ereg("(.+)\.(.+)"basename($file_name), $regs); 
  return strtolower($regs[2]); 

function 
get_file($file){ 
   $file_size = @filesize($file); 
   $fp = @fopen($file"rb"); 
   $data = @fread ($fp$file_size); 
   @fclose($fp); 
   return $data

if (isset(
$_GET['pic']) || isset($_POST['pic'])) { 
   $id = (isset($_GET['pic'])) ? $_GET['pic'] : $_POST['pic']; 
}else{ 
   $id 0

$error ""
if (
$id && isset($_SESSION['4images_pic']) && $_SESSION['4images_pic']) { 
   $expired time() - $expire
  $pic explode(" "$_SESSION['4images_pic']); 
  if (count($pic) != 3) { 
    $error "no/pic_error.gif"//general error 
  }elseif ($pic[0] != $id) { 
    $error "no/pic_image.gif"//no image found 
  }elseif ($expired >= $pic[2]) { 
    $error "no/pic_expired.gif"//image expired 
  
  if (!$error) { 
    $file base64_decode($pic[1]); 
      $file_size = @filesize($file); 
      $_SESSION['4images_pic'] = $pic[0]." ".$pic[1]." ".($pic[2]-$reduce); 
      if ($image_info = @getimagesize($file) && !is_remote_file($file) && $mime_type_match[get_file_extension($file)][0]) { 
       header ("Content-type: ".$mime_type_match[get_file_extension($file)][0]); 
       $file get_file($file); 
      header ("Content-Length: ".strlen($file)."\n\n"); 
      echo $file
      exit; 
      
      header ("Location: ".stripslashes($file)); 
      exit; 
   }else{ 
     unset($_SESSION['4images_pic']); 
   
}else{ 
  $error "no/pic_error.gif"

header("Content-type: image/gif"); 
echo 
get_file($error); 
?>


Adjust two values:
Quote:
//---- Settings --------
$expire = 35; //seconds before expiration. If u make it too low, the visitors whos on dialup will get "picture expired".
$reduce = 20; //reduce expire time in seconds after each call (not a good idea set this same as $expire time, because some browsers can do "double" page refresh, that will cause of "expire" message.)
//-- End Settings ------


Step 4.
Create 3 .gif images that would be showed instead of the real image, when something went wrong. Upload them in /no/ folder (create it first. Name of the images must be as followed):
/no/pic_error.gif - general error (something wrong with the session or ID didnt match)
/no/pic_image.gif - image not found
/no/pic_expired.gif - image expired


Step 5. (added 09/13/04)
Open postcards.php
Find:
Code:
      $image = get_media_code($image_row['image_media_file'], $image_row['image_id'], $image_row['cat_id'], $image_row['image_name'], $mode, 1);

Replace with:
Code:
      $image = get_media_code($image_row['image_media_file'], $image_row['image_id'], $image_row['cat_id'], $image_row['image_name'], $mode, 1, 0, 1);




after all this u can rename your /media/ folder to something else and noone could find where the images are  (dont forget adjust /includes/constants.php too)

P.S. this method has few down-sides:
- each time picture being viewed it will be downloaded from the server, instead of showing from cache (extra trafic)
- the script returns the original media path when the media is not an image (.avi, .zip, etc) or when media is remote.

And here is how to make sure the browser doesn't cache the viewed file to disk.

Change this IN show.php  block:
Code:
      header ("Content-Length: ".strlen($file)."\n\n");
      echo $file;
      exit;

to this:
Code:
      header ("Content-Length: ".strlen($file)."\n\n");
      header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");  // expires in the past
      header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");  // Last modified, right now
      header("Cache-Control: no-cache, must-revalidate");  // Prevent caching, HTTP/1.1
      header("Pragma: no-cache");  // Prevent caching, HTTP/1.0
      echo $file;
      exit;


martrix wrote:
It would be very nice, if somebody could write how to add this nonono.gif modification to 4images and how to mask the {media_src} url.
it's pretty much simple 
open /templates/<yourtemplate>/media/jpg.html (this example for jpg.html template, but u'll need do same thing for all others templates for images)
Replace
Code:
<img src="{media_src}" border="1" alt="{image_name}"{width_height} />
with:
Code:
<table style="background: url({media_src}) no-repeat; background-position: center center" cellpadding="0" cellspacing="0">
  <tr>
    <td><img src="{template_url}/images/spacer.gif" border="1" alt="{image_name}"{width_height} /></td>
  </tr>
</table>

asume that u have spacer.gif file in /templates/<yourtemplate>/images/ folder.

P.S. Please, help find this mod: [Mod] Get images viva MMS - Bilder als MMS empfangen UPDATE!

Offline arindra

  • Jr. Member
  • **
  • Posts: 97
    • View Profile
batch import , annotation and random images at different server if reqd
« Reply #22 on: March 17, 2005, 11:36:29 PM »
Hi I am not fully sure that these are the ones you have mentioned ... or the proper version.  but i have recieved great support from this forum several times . so if these files helps , i would be very happy . http://www.discusstv.com/discusstv.com/sigs/annotation_1_4.zip and  http://www.discusstv.com/discusstv.com/sigs/batch_import.zip

I also have this one for showing random images at external server . i am pasting here
Quote
Showing random image at external web-page (could be even on different server)

Code:

<?php
define('ROOT_PATH', './4images/');
define('SITE_URL', 'http://gallery.mysite.com/');

$db_servertype = "mysql";
$db_host = "localhost";
$db_name = "database";
$db_user = "user";
$db_password = "password";

$table_prefix = "4images_";

define('4IMAGES_ACTIVE', 1);

include_once('db_mysql.php');

define('PIC_CATEGORIES_TABLE', '4images_categories');
define('PIC_IMAGES_TABLE', '4images_images');
define('THUMB_DIR', 'data/thumbnails');
define('AUTH_ALL', 0);
define('AUTH_USER', 2);
define('AUTH_ACL', 3);
define('AUTH_ADMIN', 9);

$pics_db = new Db($db_host, $db_user, $db_password, $db_name);

function is_remote($file_name) {
  return (preg_match('#^https?\\:\\/\\/[a-z0-9\-]+\.([a-z0-9\-]+\.)?[a-z]+#i', $file_name)) ? 1 : 0;
}

$sql = "SELECT COUNT(*) as total_images FROM ".PIC_IMAGES_TABLE." a, ".PIC_CATEGORIES_TABLE." b WHERE a.image_active=1 AND a.cat_id = b.cat_id AND b.auth_viewcat=".AUTH_ALL." AND b.auth_viewimage=".AUTH_ALL."";
$row = $pics_db->query_firstrow($sql);
$total_images = $row['total_images'];

mt_srand((double)microtime() * 1000000);
$number = ($total_images > 1) ? mt_rand(0, $total_images - 1) : 0;

$sql = "SELECT a.image_id, a.cat_id, a.image_name, a.image_active, a.image_thumb_file, a.image_comments FROM ".PIC_IMAGES_TABLE." a, ".PIC_CATEGORIES_TABLE." b WHERE a.image_active=1 AND a.cat_id = b.cat_id AND b.auth_viewcat=".AUTH_ALL." AND b.auth_viewimage=".AUTH_ALL." LIMIT $number, 1";
$row = $pics_db->query_firstrow($sql);
$image_id = $row['image_id'];
$cat_id = $row['cat_id'];
$image_name = $row['image_name'];
$image_comments = $row['image_comments'];
$thumb_src = (is_remote($row['image_thumb_file'])) ? $row['image_thumb_file'] : SITE_URL.THUMB_DIR."/".$cat_id."/".$row['image_thumb_file'];

echo "<a target=\"a\" href=\"".SITE_URL."details.php?image_id=$image_id\"><img src=\"".$thumb_src."\" border=\"0\" vspace=\"2\" alt=\"$image_name\"></a><br>\n";
echo "$image_name<br>\n";
echo "<a target=\"a\" href=\"".SITE_URL."\">Total: <b>$total_images</b> images in the gallery</a><br>\n";
?>



 Showing latest image at external web-page (could be even on different server)

Code:

<?php
define('ROOT_PATH', './4images/');
define('SITE_URL', 'http://gallery.mysite.com/');

$db_servertype = "mysql";
$db_host = "localhost";
$db_name = "database";
$db_user = "user";
$db_password = "password";

$table_prefix = "4images_";

define('4IMAGES_ACTIVE', 1);

include_once('db_mysql.php');

define('PIC_CATEGORIES_TABLE', '4images_categories');
define('PIC_IMAGES_TABLE', '4images_images');
define('THUMB_DIR', 'data/thumbnails');
define('AUTH_ALL', 0);
define('AUTH_USER', 2);
define('AUTH_ACL', 3);
define('AUTH_ADMIN', 9);

$pics_db = new Db($db_host, $db_user, $db_password, $db_name);

function is_remote($file_name) {
  return (preg_match('#^https?\\:\\/\\/[a-z0-9\-]+\.([a-z0-9\-]+\.)?[a-z]+#i', $file_name)) ? 1 : 0;
}

$sql = "SELECT COUNT(*) as total_images FROM ".PIC_IMAGES_TABLE." a, ".PIC_CATEGORIES_TABLE." b WHERE a.image_active=1 AND a.cat_id = b.cat_id AND b.auth_viewcat=".AUTH_ALL." AND b.auth_viewimage=".AUTH_ALL."";
$row = $pics_db->query_firstrow($sql);
$total_images = $row['total_images'];

$sql = "SELECT a.image_id, a.cat_id, a.image_name, a.image_active, a.image_thumb_file, a.image_comments, a.image_date FROM ".PIC_IMAGES_TABLE." a, ".PIC_CATEGORIES_TABLE." b WHERE a.image_active=1 AND a.cat_id = b.cat_id AND b.auth_viewcat=".AUTH_ALL." AND b.auth_viewimage=".AUTH_ALL." ORDER BY a.image_date DESC LIMIT 1";

$row = $pics_db->query_firstrow($sql);
$image_id = $row['image_id'];
$cat_id = $row['cat_id'];
$image_name = $row['image_name'];
$image_comments = $row['image_comments'];
$thumb_src = (is_remote($row['image_thumb_file'])) ? $row['image_thumb_file'] : SITE_URL.THUMB_DIR."/".$cat_id."/".$row['image_thumb_file'];

echo "<a target=\"a\" href=\"".SITE_URL."details.php?image_id=$image_id\"><img src=\"".$thumb_src."\" border=\"0\" vspace=\"2\" alt=\"$image_name\"></a><br>\n";
echo "$image_name<br>\n";
echo "<a target=\"a\" href=\"".SITE_URL."\">Total: <b>$total_images</b> images in the gallery</a><br>\n";
?>



Usage: copy db_mysql.php from 4images directory to your external website, put <?php include("./filename.php"); ?> into the page, where you want to show pics

Offline mematola

  • Newbie
  • *
  • Posts: 10
    • View Profile
MMS
« Reply #23 on: March 18, 2005, 10:17:52 AM »
Ich habe das hier im Google Cache gefunden!

von Cr@zy Sash: Bilder als MMS auf`s Handy laden!

Code: [Select]
So hier nun ein neuer Mod von mir. Ich denke mal im Zeitalter, wo die MMS Handy im Kommen sind, da ist so ein Servcie genau das richtige für eine Seite um mehr Besucher zu bekommen.

Übersicht:

Mit diesem Mod könnt ihr euch die Thumbnails aus eurer Gallery auf euer MMS - fähiges Handy holen

Geänderte Dateien:

- includes/functions.php
- includes/constants.php
- templates/<dein Template>/details.html
- lang/<deine Sprache>/main.php

Neue Dateien:

- mms.php
- getmms.php
- templates/<dein Template>/mms.html
- templates/<dein Template>/images/mms.gif

Installation

WICHTIG: Mache vorher von den geänderten Dateien Dateien ein Backup

1.)
Öffne die Datei includes/functions.php finde:
Code:

  else {
    $user_name = $lang['userlevel_guest'];
    $user_name_link = $user_name;
  }
 

füge dahinter das ein:
Code:

$mms = '<a href="javascript:mms(\''.$site_sess->url(ROOT_PATH."mms.php?id=".$image_row['image_id']."").'\')"><img border="0" src="'.get_gallery_image("mms.gif").'"></a>';
 

suche nach:
Code:
"image_file_name" => $image_row['image_media_file'],
füge dahinter ein:
Code:
"mms" => $mms,


2.)
Öffne die Datei includes/constants.php

suche nach:
Code:

// If 4images has problems to find out the right URL, define it here.
// define('SCRIPT_URL', 'http://www.yourdomain.com/4images'); //no trailing slash
 

ersetzen mit:
Code:

// If 4images has problems to find out the right URL, define it here.
define('SCRIPT_URL', 'http://www.yourdomain.com/4images'); //no trailing slash
 

Wobei du da dann deine richtige Url zur Gallery angeben musst!!!

3.)
Öffne die templates/<dein Template>/details.html

suche nach:
Code:
{header}

füge dahinter ein
Code:

<script language="javascript">
function mms(url) {
  var winWidth = 500;
  var winHeight = 350;
  var w = (screen.width - winWidth)/2;
  var h = (screen.height - winHeight)/2 - 60;
  var name = 'MMS';
  var features = 'scrollbars=no,width='+winWidth+',height='+winHeight+',top='+h+',left='+w;
  window.open(url,name,features);
}
</script>


So nun kannst du irgenwo im Template noch den Tag {mms} setzen, damit die User das Bild schicken können.

4.)
Öffne die lang/<deine Sprache>/main.php

und füge folgendes ein:
Code:

//-----------------------------------------------------
//--- Send MMS ----------------------------------------
//-----------------------------------------------------
$lang['mmsheadline'] = "Bild als MMS schicken";
$lang['imagewidth'] = "Bildbreite:";
$lang['imageheight'] = "Bildhöhe:";
$lang['download'] = "Downlaod";
$lang['id'] = "ID:";
$lang['mmstext'] = "<b>So kommt dieses Bild auf Ihr Handy</b><br>
<ul>
  <li> Rufen Sie im WAP-Menu \"Zur Adresse\" auf<li> Geben Sie dort folgendes ein:
<br> <b>{url_mms_id}</b><li> Es erscheint folgendes:<br>
 ID: <b>{mms_id}</b><br><b>Ok, Download</b>
 <li> Wählen Sie \"Download\"<li>
  Das Bild wird nun auf Ihr Handy geladen. Bitte gedulden Sie sich einen Augenblick.<li>
  Beim abgeschlossenen Download erscheint:<br> <b>Datei empfangen</b><br>Optionen - zurück<li> Wählen Sie <BR> <b>Optionen > Speichern</b><li> Geben Sie dem Bild nun noch einen Namen und wählen Sie einen Ordner aus.<li> <b>Jetzt ist das Bild in auf Ihrem Handy abgespeichert!</b>
</ul>";
 


5.)
Erstelle eine neue Datei mms.php und füge folgenen Code ein:

Code:

<?php 
define
('ROOT_PATH''./'); 
$main_template 'mms'
include(
ROOT_PATH.'global.php'); 
require(
ROOT_PATH.'includes/sessions.php'); 
$user_access get_permission(); 
include(
ROOT_PATH.'includes/page_header.php'); 

$sql "SELECT image_id, cat_id, image_thumb_file, image_media_file FROM ".IMAGES_TABLE.
             WHERE image_id = "
.$id.""
$image_row $site_db->query_firstrow($sql); 

$file_size "n/a"
if (
$file_size = @filesize("data/thumbnails/".$image_row['cat_id']."/".$image_row['image_media_file'])) { 
   $file_size format_file_size($file_size); 
   

$size = @getimagesize("data/thumbnails/".$image_row['cat_id']."/".$image_row['image_thumb_file'].""); 
//----------------------------------------------------- 
//--- Print Out --------------------------------------- 
//----------------------------------------------------- 
$site_template->register_vars(array( 
  "thumbnail" => get_thumbnail_code($image_row['image_media_file'], $image_row['image_thumb_file'], $image_row['image_id'], $image_row['cat_id'], $mode$show_link), 
  "file_size" => $lang['file_size']." ".$file_size
  "width" => $lang['imagewidth']." ".$size[0]." ".$lang['px'], 
  "height" => $lang['imageheight']." ".$size[1]." ".$lang['px'], 
  "mmsheadline" => $lang['mmsheadline'], 
  "text" => $lang['mmstext'], 
  "mms_id" => $id
  "url_mms_id" => "".SCRIPT_URL."/getmms.php?id=".$id."" 
)); 
$site_template->print_template($site_template->parse_template($main_template)); 
include(
ROOT_PATH.'includes/page_footer.php'); 
?>

 


6.)
Erstelle eine neue Datei getmms.php und füge folgenen Code ein:

Code:

<?php 
define
('ROOT_PATH''./'); 
include(
ROOT_PATH.'global.php'); 
if (!
$id) { 
echo 
$lang['error']; 
exit; 

$sql "SELECT image_id, cat_id, image_thumb_file, image_media_file FROM ".IMAGES_TABLE.
             WHERE image_id = "
.$id.""
$image_row $site_db->query_firstrow($sql); 
echo 
$lang['id']." ".$id
echo 

<br> 
<a href=\""
.SCRIPT_URL."/data/thumbnails/".$image_row['cat_id']."/".$image_row['image_thumb_file']."\">".$lang['download']."</a>"
?>

 


7.)
Erstelle eine neue Datei templates/<dein Template>/mms.html

In dem Template kannst du folgen Tags nutzen:

- {mmsheadline}  Zur Anzeige der Überschrift
- {text}  Zur Anzeige des Hilfetextes
- {thumbnail}  Zur Anzeige der Bilddatei
- {width}  Zur Anzeige der Breite
- {height}  Zur Anzeige der Höhe
- {file_size}  Zur Anzeige der Dateigröße


Ein Beispiel des gesamten Templates:Code:

<html>
<head>
<title>{site_name}</title>
<link rel="stylesheet" href="{template_url}/style.css">
</head>
<body bgcolor="#001B8B" link="#FFFFFF" vlink="#FFFFFF" alink="#FFFFFF" text="#FFFFFF">
<table width="100%" border="0" cellpadding="1" cellspacing="0">
        <tr>
          <td class="head1" height="19">{mmsheadline}</td>
        </tr>
        <tr>
          <td class="head1">
          <table width="100%" border="0" cellpadding="3" cellspacing="0">
         <tr>
          <td class="row2">{text}</td>
        </tr>
        </table>
          </td>

          <td class="head1">
          <table width="100%" border="0" cellpadding="3" cellspacing="0">
        <tr>
          <td class="row2" align="center">{thumbnail}<p>{file_size}<p>{widh}<p>{height}</td>
        </tr>
        </table>

</body>
</html>
 


 
Erstelle einen neuen Button templates/<dein Template>/images/mms.gif

Feritg!
So nun nochein paar wichtige Information zur Nutzung:

Die Thumbnails dürfen nicht größer als 128x128 sein und sollten wenn möglich eine Dateigröße von 18 kb nicht überschreiten. Alles weitere rund um die Nutzung dürfte aus dem Infotext klarwerden, der erscheint, wenn man den MMS Button in der Detailansicht klickt.

Eine Demo gibt es wie immer unter: http://crazyfunpics.de

==========================================


Offline Sheon

  • Jr. Member
  • **
  • Posts: 51
    • View Profile
Re: Missing MODs/FIXes/FAQs (Updated 16-03-2004 08:18 EST)
« Reply #24 on: March 19, 2005, 06:40:37 PM »
to mematola

Maybe you have this mod in English?

Offline Mark Gunter

  • Jr. Member
  • **
  • Posts: 62
    • View Profile
    • http://www.allservico.com/
Re: Missing MODs/FIXes/FAQs (Updated 16-03-2004 08:18 EST)
« Reply #25 on: March 20, 2005, 03:28:19 PM »
@ Vano, I have published PMv2.5.3 in this thread. If you are happy with the formatting I gave it, I can post it to the correct forum?

Offline sullyirl

  • Newbie
  • *
  • Posts: 23
    • View Profile
    • http://www.thenet2k.com
Re: Missing MODs/FIXes/FAQs (Updated 20-03-2004 15:55 EST)
« Reply #26 on: March 20, 2005, 10:30:24 PM »
Hello :)

Well I only ever used one mod, which was the one "IPB V2 Intergration". Never worked for me, but others may be able to give it a whirl (or contact me if you can help me with it!).

File attatched.

---
Hallo! :)

Ich habe die "IPB V2 Intergration" steckbar. Die Akte ist attatched. Anmerkung: Diese Akte ist auf englisch nur.

- Sully

Offline mematola

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Missing MODs/FIXes/FAQs (Updated 16-03-2004 08:18 EST)
« Reply #27 on: March 26, 2005, 10:02:03 AM »
to mematola

Maybe you have this mod in English?

please!

Code: [Select]
==========================================
Well a new tecnologie is born. MMS! I think you can get more users on your gallery if you have a mms service on it.

Overview:

You can recieve all images on your mms mobilphone.

Changed files:

- includes/functions.php
- includes/constants.php
- templates/<dein Template>/details.html
- lang/<deine Sprache>/main.php

New files:

- mms.php
- getmms.php
- templates/<dein Template>/mms.html
- templates/<dein Template>/images/mms.gif

Installation

Important: Backup all files

1.)
Open includes/functions.php find:
Code:

  else {
    $user_name = $lang['userlevel_guest'];
    $user_name_link = $user_name;
  }
 

add after:
Code:

$mms = '<a href="javascript:mms(\''.$site_sess->url(ROOT_PATH."mms.php?id=".$image_row['image_id']."").'\')"><img border="0" src="'.get_gallery_image("mms.gif").'"></a>';
 

suche nach:
Code:
"image_file_name" => $image_row['image_media_file'],
füge dahinter ein:
Code:
"mms" => $mms,


2.)
open includes/constants.php

find:
Code:

// If 4images has problems to find out the right URL, define it here.
// define('SCRIPT_URL', 'http://www.yourdomain.com/4images'); //no trailing slash
 

replace with:
Code:

// If 4images has problems to find out the right URL, define it here.
define('SCRIPT_URL', 'http://www.yourdomain.com/4images'); //no trailing slash
 

Don't foget 2 edit the line. Your must set your domain!!!

3.)
open templates/<dein Template>/details.html

find:
Code:
{header}

add after
Code:

<script language="javascript">
function mms(url) {
  var winWidth = 500;
  var winHeight = 350;
  var w = (screen.width - winWidth)/2;
  var h = (screen.height - winHeight)/2 - 60;
  var name = 'MMS';
  var features = 'scrollbars=no,width='+winWidth+',height='+winHeight+',top='+h+',left='+w;
  window.open(url,name,features);
}
</script>


You can use the {mms} tag in your details template in order to let users recieve mms.

4.)
open lang/<deine Sprache>/main.php

add:
Code:

//-----------------------------------------------------
//--- Send MMS ----------------------------------------
//-----------------------------------------------------
$lang['mmsheadline'] = "Recieve image over mms";
$lang['imagewidth'] = "Width:";
$lang['imageheight'] = "Height:";
$lang['download'] = "Downlaod";
$lang['id'] = "ID:";
$lang['mmstext'] = "<b>This picture on your mobile</b><br>
<ul>
<li> Choose in the Services-menu 'Go to address'<li> Put the following in the gap:<br> <B>
{url_mms_id}</B><li> Then you see this:<BR> ID: <b>{mms_id}</b><br><b>Ok, Download</b><li> Choose 'Ok, download'<li> The picture will be loaded. Please be patient.<li> After the download you see the following:<br> <b>File recieved</b><br>Options - back<li> Choose <br> <b>Options > Save</b><li> Rename the picture and choose a folder.<li> <b>Now is the picture on your mobile :-)</b>
</ul>";
 


5.)
create mms.php add the following code:

Code:

<?php 
define
('ROOT_PATH''./'); 
$main_template 'mms'
include(
ROOT_PATH.'global.php'); 
require(
ROOT_PATH.'includes/sessions.php'); 
$user_access get_permission(); 
include(
ROOT_PATH.'includes/page_header.php'); 

$sql "SELECT image_id, cat_id, image_thumb_file, image_media_file FROM ".IMAGES_TABLE.
             WHERE image_id = "
.$id.""
$image_row $site_db->query_firstrow($sql); 

$file_size "n/a"
if (
$file_size = @filesize("data/thumbnails/".$image_row['cat_id']."/".$image_row['image_media_file'])) { 
   
$file_size format_file_size($file_size); 
   } 

$size = @getimagesize("data/thumbnails/".$image_row['cat_id']."/".$image_row['image_thumb_file'].""); 
//----------------------------------------------------- 
//--- Print Out --------------------------------------- 
//----------------------------------------------------- 
$site_template->register_vars(array( 
  
"thumbnail" => get_thumbnail_code($image_row['image_media_file'], $image_row['image_thumb_file'], $image_row['image_id'], $image_row['cat_id'], $mode$show_link), 
  
"file_size" => $lang['file_size']." ".$file_size
  
"width" => $lang['imagewidth']." ".$size[0]." ".$lang['px'], 
  
"height" => $lang['imageheight']." ".$size[1]." ".$lang['px'], 
  
"mmsheadline" => $lang['mmsheadline'], 
  
"text" => $lang['mmstext'], 
  
"mms_id" => $id
  
"url_mms_id" => "".SCRIPT_URL."/getmms.php?id=".$id."" 
)); 
$site_template->print_template($site_template->parse_template($main_template)); 
include(
ROOT_PATH.'includes/page_footer.php'); 
?>

 


6.)
create getmms.php add the following code:

Code:

<?php 
define
('ROOT_PATH''./'); 
include(
ROOT_PATH.'global.php'); 
if (!
$id) { 
echo 
$lang['error']; 
exit; 

$sql "SELECT image_id, cat_id, image_thumb_file, image_media_file FROM ".IMAGES_TABLE.
             WHERE image_id = "
.$id.""
$image_row $site_db->query_firstrow($sql); 
echo 
$lang['id']." ".$id
echo 

<br> 
<a href=\""
.SCRIPT_URL."/data/thumbnails/".$image_row['cat_id']."/".$image_row['image_thumb_file']."\">".$lang['download']."</a>"
?>

 


7.)
create templates/<dein Template>/mms.html

you can use the following tags:

- {mmsheadline}  to show the headline
- {text}  to show the helptext
- {thumbnail}  to show the image
- {width}  to show the width
- {height}  to show the height
- {file_size}  to show the file size


Possible example of the template:Code:

<html>
<head>
<title>{site_name}</title>
<link rel="stylesheet" href="{template_url}/style.css">
</head>
<body bgcolor="#001B8B" link="#FFFFFF" vlink="#FFFFFF" alink="#FFFFFF" text="#FFFFFF">
<table width="100%" border="0" cellpadding="1" cellspacing="0">
        <tr>
          <td class="head1" height="19">{mmsheadline}</td>
        </tr>
        <tr>
          <td class="head1">
          <table width="100%" border="0" cellpadding="3" cellspacing="0">
         <tr>
          <td class="row2">{text}</td>
        </tr>
        </table>
          </td>

          <td class="head1">
          <table width="100%" border="0" cellpadding="3" cellspacing="0">
        <tr>
          <td class="row2" align="center">{thumbnail}<p>{file_size}<p>{widh}<p>{height}</td>
        </tr>
        </table>

</body>
</html>
 


 
create a new button templates/<dein Template>/images/mms.gif

Done!
Some information about the mod:

The thumbnails must be max. 128x128 px and the file size shouldn't be heigher than von 18 kb..

DEMO: http://crazyfunpics.de


Offline sullyirl

  • Newbie
  • *
  • Posts: 23
    • View Profile
    • http://www.thenet2k.com
Re: Missing MODs/FIXes/FAQs (Updated 02-04-2004 14:00 EST)
« Reply #28 on: April 03, 2005, 10:58:25 PM »
mematola : That MMS mod doesnt work.. the option to do the MMS thing aint appearing

Offline mematola

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Missing MODs/FIXes/FAQs (Updated 02-04-2004 14:00 EST)
« Reply #29 on: April 06, 2005, 12:06:15 PM »
Sorry, its not my mod! I have found this on google!