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

Pages: [1] 2
1
Hello,

I want to make something like VIP and Gold members accounts. User sends SMS and in users table i will check a mark on new column "status" is he a VIP=2 or Gold=1 or Simple=0. Everything with SMS is simple. But after this, I want to do several things:

1. Everywhere, user nick must be with ( [VIP] / [GOLD] username ).
2. For users who has vip or gold account i want to do thing like last loged in members. But this must show last users who viewed my profile. Member nick + member small photo. And everything is a link to private message.
3. And final thing is diferent styles for comments, something like if (user = vip || user = gold) { class="vip" } else { class="simple" }

So... is it possible to do? :} I just need the beggining... then I will try to do everything on my own, and share with others.

2
Why some flash ar so small in width and height? When actualy they ar bigger?

Test:
http://www.funny.lt/details.php?image_id=8045

My flash template looks like that:
Code: [Select]
<!-- Template file for Flash Movies -->
<table cellpadding="1" cellspacing="0" border="0">
  <tr>
    <td bgcolor="#000000">
  <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" {width_height}/>
      <param name="movie" value="{media_src}">
      <param name="quality" value="high">
      <param name="play" value="true">
      <param name="scale" value="false">
      <embed src="{media_src}" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash"{width_height}></embed></object></td>
  </tr>
</table>

3
What is wrong with this template...?
I cant get this value {width_height}
Can someone help? http://www.funny.lt/details.php?image_id=8045

Code: [Select]
<!-- Template file for Flash Movies -->
<table cellpadding="1" cellspacing="0" border="0">
  <tr>
    <td bgcolor="#000000">
  <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"{width_height} />
      <param name="movie" value="{media_src}">
      <param name="quality" value="high">
      <param name="play" value="true">
      <param name="scale" value="false">
      <embed src="{media_src}" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash"{width_height}></embed></object></td>
  </tr>
</table>

4
Maybe someone now how to make user photo rating? Or Users "karma"? I thing will be great, something like community.

5
Mods & Plugins (Requests & Discussions) / External image vote.
« on: May 19, 2005, 01:05:37 PM »
I`m writing a new mod for 4 images, i will share it later with everybody.
It will be wap photo gallery, from selected category, it will show images, its rating... and everything that is possible to show from page.
But, how can i put a voting, I only need a link to vote.
Can someone help? :)

6
version 1.1

Everything what is needed is:
config.php - from 4images
.htaccess file (must be in folder where who.php will be)
who.php (you can name it how you want)

now no test needed, just set your url and try it. I`ve tested it only on my server.
will work only with this link http://your_url/who/user name
not with http://your_url/who/user name/


.htaccess

Code: [Select]
<files *>
Options MultiViews
</files>

who.php

Code: [Select]
<?
// Settings
///////////////////////////////////////////

$url = "http://www.pramoga.net";
$table = "4images_users"; //do not edit if you have not changed table prefix

// Code
///////////////////////////////////////////

include "config.php";
$a_url = $_SERVER["REQUEST_URI"];
$i = explode("/", $a_url);
$b = count($i);
$b = $b-1;
$i = str_replace(array("%20"), " ", $i[$b]);
if (($i != "") and ($i != "guest"))
{
$db = mysql_connect("$db_host", "$db_user", "$db_password") or die ("Error");
@mysql_select_db("$db_name", $db) or die ("DB not found");
$result = mysql_query("SELECT user_id FROM `$table` WHERE user_name='$i'");
$row = mysql_fetch_array($result);
$id = $row['user_id'];
header("Location: ".$url."/member.php?action=showprofile&user_id=".$id."");
}
else
{
header("Location: ".$url."");
}
?>


version 1

Just a little script that I made for my site :)
A personal addres for users, to profile.

DEMO: http://www.pramoga.net/who/admin/ (admin is user name, existing in 4images gallery)

So, first I want to explain how it works :)
"who" is not a folder, it`s originaly a script called who.php, to use this script without extension .php you will need to put .htaccess file into the folder where who.php is. The code of .htaccess is:

Code: [Select]
<files *>
Options MultiViews
</files>

So the first thing is done :)
Second is very important for script who.php and it depends on your url, how many slashes "/" there is. I made a little test to find out what number for variables you will need.

test.php
Code: [Select]
<?
$url = "http://www.pramoga.net"; //your url
$url_extender = $_SERVER["REQUEST_URI"];
$all_url = $url.$url_extender;
print_r(explode("/", $all_url));
?>

Change url in this script and go to it like that
http://www.pramoga.net/test/admin (can be another user name)
or
http://www.pramoga.net/test.php/admin (can be another user name)

DEMO: http://www.pramoga.net/test/admin
We need a number of user name, So we take it from here
Array (
  • => http: [1] => [2] => www.pramoga.net [3] => test.php [4] => admin )
    The number is 4

    We can go to final step :)

    Script who.php
    Code: [Select]
    <?
    /////////////////////////////////////////////
    // Originaly made for http://www.pramoga.net
    // If you made any modifications, feel free
    // to contact with me and share your code ;)
    /////////////////////////////////////////////

    $url = "http://www.pramoga.net";

    /////////////////////////////////////////////
    include "config.php";
    $url_extender = $_SERVER["REQUEST_URI"]; // gets url end
    $all_url = $url.$url_extender; // i dont know why, but i make all url...
    $i = explode("/", $all_url); // then I delete all slashes
    $i = $i[4]; // when I get array of symbols, I take fourth symbol (it depends on url)
    $i = str_replace(array("%20"), " ", $i); // replaces %20 with simple space " "
    if (($i != "") and ($i != "guest")) //if url is with name and it`s not guest
    {
    $db = mysql_connect("$db_host", "$db_user", "$db_password") or die ("Error"); // connecting to db
    @mysql_select_db("$db_name", $db) or die ("DB not found"); // selecting db
    $result = mysql_query("SELECT user_id FROM `4images_users` WHERE user_name='$i'"); //querying mysql, and selecting users id from db
    $row = mysql_fetch_array($result);
    $id = $row['user_id']; //selected id seting to variable $id
    //finally
    header("Location: ".$url."/member.php?action=showprofile&user_id=".$id.""); //setting header location to members profile
    }
    else //if no name was given
    {
    header("Location: ".$url.""); //setting header location to index page
    }
    // thats all :)
    ?>

    Find
    Code: [Select]
    $i[4]; and change 4 to your number, that you find in test.php :)

    It`s explained step by step, so it`s very simple :)
    Upload it to the server and try :)

7
If I do Check new images in admin panel and I found a bad image (I don`t like it) how to add a link or maybe button [ delete selected ] to delete these/this file(s)? Is it difficult to do?

8
Mods & Plugins (Requests & Discussions) / Hide rate form after vote.
« on: April 23, 2005, 04:21:25 PM »
How to hide rate form if user already voted?

9
Mods & Plugins (Requests & Discussions) / bbcode2 in comments...?
« on: April 22, 2005, 08:33:42 AM »
Why I am able to use bbcode2 only in pm? How can I turn it on in comments? I mean bbcode2 stuff box

10
Quote
<tr>
    <td width="35%" align="right"><b>{lang_icq}</b></td>
    <td>{if user_icq}<a href="http://wwp.icq.com/scripts/search.dll?to={user_icq}">{user_icq}</a> (<b>{user_icq_status}</b>){endif user_icq}</td>
</tr>

Why I never saw (<b>{user_icq_status}</b>) thing working? And how to fix it? I`m talking about member_profile.html

You can try to look at this here: http://www.pramoga.net/member.php?action=showprofile&user_id=1

11
Mods & Plugins (Requests & Discussions) / BBcode2 and Smileys
« on: April 19, 2005, 02:59:56 PM »
Can someone answer me the QUESTION :?:?
How and where can I find the mods  bbcode2 (rich bbcode :) ) and smileys ( text smileys replaces to images )

12
How to make field headline optional in comments?
In old forum code was somewhere....

13
Discussion & Troubleshooting / Warning: getimagesize(): Read error!
« on: April 18, 2005, 07:42:42 AM »
What this error means? :|
Thumbnailer works but I always see this:

Warning: getimagesize(): Read error! in /home/pramoga/public_html/admin/thumbnailer.php on line 115

14
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 ;]

15
Mods & Plugins (Requests & Discussions) / New file type.
« on: March 13, 2005, 04:23:33 PM »
What to do, to enable these: mmst://mms.skynet.lt/SuperFM128
I want to do Radio listening in my page, but it has no file extension.

Pages: [1] 2