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

Pages: 1 ... 5 6 7 8 [9] 10
121
I just don`t know how to express my self.
Just look there, at the last post and its photo http://www.pramoga.net/details.php?image_id=2522

I`ve just installed this mod, and did nothing more.

122
Sorry, avatar = personal photo ;]

123
Can someone say what to do to solve this problem?
If registered user posts a comment he is with avatar, but after him, guest posts comment, he is with registered user avatar, that posted before him...

Help please

124
you see, if you define some parameters here:

Code: [Select]
<?
$something = 'some text';
?>

later you can print it in the script any where, byt typing this:

Code: [Select]
<?
echo $something;
?>

125
Everything there is very simple ;]


These is only settings, needed by script later
Quote
<?
//Some settings
$url = 'http://url.to.your.page'; //where installed 4images, without traling slash
$title = 'wap page'; //title for wap card
$no_id = 'ID not found'; //msg when no id found
$enter_id = 'Enteri ID'; //msg when user comes
$button = 'show'; //text for button
$footer = 'footer'; //footer text
$dbhost = "localhost"; //host of database
$dbuser = "root"; //database user
$dbpass = ""; //database pass
$dbname = ""; //and database ;]

Page header:
Quote
//dont need to change after this
header("Content-type: text/wml");
echo("<?xml version=\"1.0\" encoding=\"windows-1257\"?>\n");
echo("<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\""
." \"http://www.wapforum.org/DTD/wml_1.1.xml\">\n");
?>

Begining of the page:
Quote
<wml>
<card title="<? echo $title ?>"> <-- echo title name from settings ;]
<center>
<form method="post">
<?php
$id = $_REQUEST['id']; <-- gets user posted values from form
if($id!=""){
$db = mysql_connect("$dbhost", "$dbuser", "$dbpass") or die ("Error"); <-- connects to the database, and gets all information
@mysql_select_db("$dbname", $db) or die ("DB not found");
$result = mysql_query("SELECT image_id, image_media_file, cat_id, image_name FROM 4images_images where image_id=$id");
$row = mysql_fetch_array($result);
$image_id = $row["image_id"];
$cat_id = $row["cat_id"];
$image_name = $row["image_name"];
if ($image_id!=""){
$image_media_file = $row["image_media_file"];
?>

prints a link to media file:
<a href="<? echo $url;?>/data/media/<? echo $cat_id;echo "/";echo $image_media_file; ?>"><? echo $image_name;?></a><br />
<?php }
else { echo $no_id; } } <-- if no id given
else { echo $enter_id; } <-- enter ID
?>
<br />
<input name="id" type="text" id="id" size="6" /><br />
<input name="submit" type="submit" value="<? echo $button ?>" /> <-- button name from settings
</form>
<br />
<small>&reg; <? echo $footer ?></small> <-- footer from settings
</center>
</card>
</wml>

126
the file must be index.php
 this:
Code: [Select]
echo("<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\""
." \"http://www.wapforum.org/DTD/wml_1.1.xml\">\n");

shows browser what type of document is this, so it must work.

127
what phone you browse with?
wml format is supported by many mobile phones.

128
working  :wink:

129
try this...  :wink:
Code: [Select]
<?
//Some settings
$url = 'http://wartenaufden15.de'; //where installed 4images, without traling slash
$title = 'wap.wartenaufden15.de'; //title for wap card
$no_id = 'ID nicht gefunden'; //msg when no id found
$enter_id = 'Gib die ID ein'; //msg when user comes
$button = 'Anzeigen'; //text for button
$footer = '(c) 2005 by wartenaufden15.de'; //footer text
$dbhost = "localhost"; //host of database
$dbuser = "DB16XXXX"; //database user
$dbpass = "XXXXXXXX"; //database pass
$dbname = "DB16XXXX"; //and database ;]

//dont need to change after this
header("Content-type: text/wml");
echo("<?xml version=\"1.0\" encoding=\"windows-1257\"?>\n");
echo("<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\""
." \"http://www.wapforum.org/DTD/wml_1.1.xml\">\n");
?>
<wml>
<card title="<? echo $title ?>">
<center>
<form method="post">
<?php
$id 
$_REQUEST['id'];
if(
$id!=""){
$db mysql_connect("$dbhost""$dbuser""$dbpass") or die ("Error");
@
mysql_select_db("$dbname"$db) or die ("DB not found");
$result mysql_query("SELECT image_id, image_media_file, cat_id, image_name FROM 4images_images where image_id=$id");
$row mysql_fetch_array($result);
$image_id $row["image_id"];
$cat_id $row["cat_id"];
$image_name $row["image_name"];
if (
$image_id!=""){
$image_media_file $row["image_media_file"];
?>

<a href="<?php echo $url;?>/data/thumbnails/<?php echo $cat_id;echo "/";echo $image_media_file?>"><?php echo $image_name;?></a><br />
<?php }
else { echo 
$no_id; } }
else { echo 
$enter_id; }
?>

<br />
<input name="id" type="text" id="id" size="6" /><br />
<input name="submit" type="submit" value="<?php echo $button ?>" />
</form>
<br />
<small>&reg; <? echo $footer ?></small>
</center>
</card>
</wml>

130
how it looks, it`s in lithuanian :)

131
Because you have editted the code:
Code: [Select]
//dont need to change after this
header("Content-type: text/wml");

this you replaced with this:

Code: [Select]
//dont need to change after this
header("Content-type: text/vnd.wap.wml");
echo("Content-type: text/vnd.wap.wml\n");

So you get parsing error, try to do like in my example ;)

132
Today I have made my first mod for 4images gallery  :wink:
I`m using it for a special category for mobile phones, there are a lot of *.mid files, and users can get it by writing its ID in my WAP page. So... there it goes.

Need to edit one file, and create one.
1. Make a dir something like "wap" at your server.
2. Put file named index.php into dir, with this text (edit settings first  :wink: ):
Code: [Select]
<?
//Some settings
$url = 'http://url.to.your.page'; //where installed 4images, without traling slash
$title = 'wap page'; //title for wap card
$no_id = 'ID not found'; //msg when no id found
$enter_id = 'Enteri ID'; //msg when user comes
$button = 'show'; //text for button
$footer = 'footer'; //footer text
$dbhost = "localhost"; //host of database
$dbuser = "root"; //database user
$dbpass = ""; //database pass
$dbname = ""; //and database ;]

//dont need to change after this
header("Content-type: text/wml");
echo("<?xml version=\"1.0\" encoding=\"windows-1257\"?>\n");
echo("<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\""
." \"http://www.wapforum.org/DTD/wml_1.1.xml\">\n");
?>
<wml>
<card title="<? echo $title ?>">
<center>
<form method="post">
<?php 
$id 
$_REQUEST['id'];
if(
$id!=""){
$db mysql_connect("$dbhost""$dbuser""$dbpass") or die ("Error");
@
mysql_select_db("$dbname"$db) or die ("DB not found");
$result mysql_query("SELECT image_id, image_media_file, cat_id, image_name FROM 4images_images where image_id=$id");
$row mysql_fetch_array($result);
$image_id $row["image_id"];
$cat_id $row["cat_id"];
$image_name $row["image_name"];
if (
$image_id!=""){
$image_media_file $row["image_media_file"];
?>

<a href="<? echo $url;?>/data/media/<? echo $cat_id;echo "/";echo $image_media_file; ?>"><? echo $image_name;?></a><br />
<?php }
else { echo 
$no_id; } }
else { echo 
$enter_id; }
?>

<br />
<input name="id" type="text" id="id" size="6" /><br />
<input name="submit" type="submit" value="<? echo $button ?>" />
</form>
<br />
<small>&reg; <? echo $footer ?></small>
</center>
</card>
</wml>

3. Edit details.html and add this where you like:
Code: [Select]
      <tr>
        <td><b>ID for WAP</b></td>
        <td>{image_id}</td>
      </tr>

4. Point your mobile to this page and try it.

By changing this "/data/media/" to "/data/thumbnails/" you can show only small pictures, but i`m using this script for mobile melodies in *.mid format, so it works  :wink:
Sorry for my english.

Good luck ;]

133
will this mod work with 4images 1.7.1?
and if it`s possible to change something to adopt it, please help ;)

134
Hmmm... Then I have big problem ;] I have more then 1700 users

135
Will this mod work with 1.7.1, if the sessions.php is diferent from 1.7 version.
And how to make it work?

Pages: 1 ... 5 6 7 8 [9] 10