Author Topic: MMS getmms.php | BUG in 1.7.1 | search solution!!!!!! | 29.10.2005  (Read 18498 times)

0 Members and 1 Guest are viewing this topic.

bildergallery

  • Guest


hier der code in deutsch
habe rausgefunden dass dieses mod nur für vers. 1.7 läuft, unter der vers. 1.7.1 tritt ein komischer fehler auf. was ist an diesem code falsch?
ich habe dieses mms mod installiert


Code: [Select]
Geänderte Dateien:

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

Neue Dateien:

- mms.php //root ordner
- getmms.php //root ordner
- 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.bildergallery.com'); //no trailing slash



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>


leider bekomme ich auf meiner webseite bildergallery.com bei der detailansicht mms button zwar das javascript popup jedoch werden die kategorie und id nicht in die entsprechenden felder geladen. Siehe Beispiel... (*gif images)


   


Wie kann ich ausserdem erreichen, dass nur registrierte Benutzer zugang zu diesem Button haben?
 

bitte helft mir, bin fast am verzweifeln.....
vielen dank

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Are you having trouble with a published mod? if so, please reply to the topic u are refering to!
If this is something you made yourself and you require assistance, please be more specific on what you did, and what is the problem. Also, mixing two languages in one reply makes it very hard to folow. Next time post a reply to your original post with a translated version, not both in one reply.

Thank you.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Acidgod

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 2.421
  • It's me?
    • View Profile
    • Flash-Webdesign
Re: MMS getmms.php | BUG in 1.7.1 | urgent solution searched!!
« Reply #2 on: October 28, 2005, 05:16:35 PM »
kann ich mir das irgendwo anschauen?

Offline Acidgod

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 2.421
  • It's me?
    • View Profile
    • Flash-Webdesign
Re: MMS getmms.php | BUG in 1.7.1 | urgent solution searched!!
« Reply #3 on: October 28, 2005, 05:39:36 PM »
wenn ich es später schaffe installiere ich es mal local auf einer 1.7.1 und dann mal schauen wo das Problem liegt, aber jetzt muss ich erstmal ein Dreamboard zum laufen bringen...

Offline BartAfterDark

  • Hero Member
  • *****
  • Posts: 520
    • View Profile
Re: MMS getmms.php | BUG in 1.7.1 | search solution!!!!!! | 29.10.2005
« Reply #4 on: October 30, 2005, 01:36:36 AM »
you could also try http://www.mpush.com/
That way you can earn some extra money :)

Offline terravision

  • Pre-Newbie
  • Posts: 5
    • View Profile
Re: MMS getmms.php | BUG in 1.7.1 | search solution!!!!!! | 29.10.2005
« Reply #5 on: January 03, 2006, 11:39:35 AM »
Hallo

Ich habe das Script heute ausprobiert.
Aber leider zeogt es mir den Button für MMs nicht an .
Kann mir jemand sagen woran das liegen könnte ?

Vielen dank im vorraus.

LG Doreen

Offline terravision

  • Pre-Newbie
  • Posts: 5
    • View Profile
Re: MMS getmms.php | BUG in 1.7.1 | search solution!!!!!! | 29.10.2005
« Reply #6 on: January 03, 2006, 11:56:03 AM »
Jetzt bekomme ich immer diese Fehlermeldung :-(

Parse error: syntax error, unexpected $end in /www/htdocs/v079538/4images/lang/deutsch/main.php on line 383

Offline excitex2

  • Addicted member
  • ******
  • Posts: 1.590
  • He desactivado la galería y el buscador
    • View Profile
Lo importante no es saber,,, lo importante es tener el E-Mail de quien sabe

Offline smilysm

  • Newbie
  • *
  • Posts: 27
    • View Profile
Re: MMS getmms.php | BUG in 1.7.1 | search solution!!!!!! | 29.10.2005
« Reply #8 on: May 05, 2006, 08:52:16 PM »
hi,

gibs da eine Variante für 1.7.2 ??

mfg smilysm

Offline masterofdisaster

  • Pre-Newbie
  • Posts: 4
    • View Profile
Re: MMS getmms.php | BUG in 1.7.1 | search solution!!!!!! | 29.10.2005
« Reply #9 on: May 31, 2006, 11:34:25 AM »
hi ivan ,

u have mentioned that details.html has to modified to show the mms button ?? what are the modification that are required ?

Thanks
Akshay

Offline masterofdisaster

  • Pre-Newbie
  • Posts: 4
    • View Profile
Re: MMS getmms.php | BUG in 1.7.1 | search solution!!!!!! | 29.10.2005
« Reply #10 on: May 31, 2006, 12:41:26 PM »

Im getting the following error .. Can anyone help please ??

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in \4images\mms.php on line 3

Parse error: syntax error, unexpected T_STRING in \4images\mms.php on line 3

Thanks
Akshay