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

Pages: 1 [2] 3 4
16
Installation, Update & Configuration / Disable Image Upload For Admin
« on: February 14, 2010, 05:00:11 AM »
 :mrgreen: Im Going to Ask the most weird Question  :wink:
Let me tell u what it is   :lol:

How To Disable Image upload For Administrator ? i Want to turn off the uplod button and need to increase the size of the URL: field in Add images page at admin panel :)

And 1 more - Image Uploading or the image URL is a req field in the add new image in admin page // can i disable that and make the description field a req field ?


~ Thanks ~

~ Regards ~
~ GaYan ~

17
Hello ! My Name Is GaYan :)

Im a big fan of 4images :D as every1 knows ;)

i have a small issue which every has.. that's including or adding new files types to the gallery, for example adding a 3gp or flv video/... to do that ,we must install about 2 or more mods .. their can be many file types, google video,youtube or may be a youtube playlist..

i have tried any Great mods in this forum to fulfill this need. but i failed ;)

so im suggesting a new way - this will be a very easy task for a programmer...

instead of upload button in the add new image page in admin panel,

can we place a WYSIWYG Editor  thier ?

so that every1 could use it in embeeding purposes .. even we cud upload images too ;)

can some1 please help me .. this MOD will not only help me..alot of other users of 4images.. thank you in advance :)
~
Regards ~
~ GaYan ~

18
Mods & Plugins (Requests & Discussions) / A Preloader For 4image Gallery
« on: December 31, 2009, 07:58:49 AM »
Hey ! !

can we insert a preloader for our web 4imge web pages... for exmaple....

cant we set a preloader of for index.php and details.php
its because thier are lots of imges to get loaded... so if we hve a preloader ... the user can wait untill the pages are preloaded completely and start  browsing them ;)

it works handy !! !! can any1 help me please !

Code: [Select]
<!-- Cut-N-Paste JavaScript from ISN Toolbox
     Copyright 1996, Infohiway, Inc.  Restricted use is hereby
     granted (commercial and personal OK) so long as this code
     is not *directly* sold and the copyright notice is buried
     somewhere deep in your HTML document.  A link to our site
     http://www.infohiway.com is always appreciated of course,
     but is absolutely and positively not necessary. ;-)   -->
<html>
<head><title>Demo of "Zero Waiting Time" Preload Script</title></head>
<script language="JavaScript">
<!--
//vers = 1.0;
// -->
</script>
<script language="JavaScript1.1">
<!--
vers = 1.1;  // comment out this line to make it use a non-graphical status bar
// -->
</script>
<script language="javascript">
<!--
function initArray() {
 for (var i = 0; i < initArray.arguments.length; i++)
  this[i] = initArray.arguments[i];
 this.length = initArray.arguments.length;
}

// Define the pages you want it to preload here.
// Note that each of these pages must have a short bit of code
// at the top as shown in page1.htm.
var pages = new initArray(
 "page1.htm",
 "page2.htm",
 "page3.htm",
 "page4.htm");

var secondpage = "page1.htm"; // URL of second page goes here

function transfer(param) {
 location.href = secondpage;
}

function done() {
 for (g=0;g<pages.length;g++)
  eval('self.preload_frame'+g+'.location.href = "'+pages[g]+'";');
}

// preload the status bar images
if (vers >= 1.1) {
 blue = new Image();
 blue.src = "blue.gif";
 black = new Image();
 black.src = "black.gif";
}

var num_loaded = 0;

function update() {
 if (vers < 1.1) // non-graphical version
  self.topframe.document.stats.status.value += "||";
 else // graphic version
  eval('self.topframe.document.status'+num_loaded+'.src = "blue.gif";');
 num_loaded++;
 if (num_loaded == pages.length)
  transfer();
}

document.write('<FRAMESET FRAMEBORDER=NO BORDER=0 '
 + 'BORDERCOLOR="white" ROWS="*,0" FRAMESPACING=0>'
 + '<FRAME SRC="topframe.htm" name="topframe" SCROLLING="auto">'
 + '<FRAMESET FRAMEBORDER=NO BORDER=0 '
 + 'BORDERCOLOR="white" COLS="*');
for (g=1;g<pages.length;g++)
 document.write(',0');
document.write('" FRAMESPACING=0>');
for (g=0;g<pages.length;g++)
 document.write('<FRAME SRC="blank.htm" NAME="preload_frame'+g+'" '
  + 'SCROLLING="NO" NORESIZE>');
document.write('</FRAMESET></FRAMESET>');
document.close();

// -->
</script>
</html>


above is  code i found for preloading  web pge..can we apply this to 4images ? ? please help  8O

thnks in advance

19
Programming / Fake Users :D :D
« on: November 19, 2009, 04:04:27 PM »
Hey :)  :D
im about to do a crime  :mrgreen:

i have a code to show fake users onle  :D

Code: [Select]
function randomGen($min, $max)
{
    // setup our seed
    srand((float) microtime() * 10000000);
    // Generate the number
    $random = rand($min,$max);
   // Return the number
    return $random;
}
/*adjust these numbers to display a random number within a range-
make sure the low number is on the left.*/

$random_number = randomGen(10,25);
echo "<br/>There are " .$random_number. " visitors online";

hehe..paste this is your index..havent tested this 4images.but works fine for vbulleting and other forum boards !

Have Fun !

20
Discussion & Troubleshooting / SEO Problem :(
« on: November 19, 2009, 03:53:47 PM »
Hellow Experts ..  :arrow:

i have a big issue... i realy dnt knw much abput this seo .. i have seen many seo mods over here and i dont know which 1 to use  :mrgreen:

what i need is : ex :-
                           If a user goto google and type "Windows 7 HD blah blah  :mrgreen:" and if i have a image with that name in my site..i want it to be shown in the result list...

Hope u got what i meant  :roll: is thier a mod like this to 4images ? ! !

-------------------------------------------------------------------------------------------------
GaYan - Best Flash Web Designer of the Year in Sri Lanka ( SLASSI )
--------------------------------------------------------------------------------------------------

21
Programming / urgent help = ERROR
« on: November 17, 2009, 04:23:20 PM »
Code: [Select]
<?php
$mybody 

urldecode($_POST[&quot;body&quot;]);if(!$mybody){
print &
quot;&returnMe=Server Error!&quot;;
exit;
}else{
$filefopen(&quot;images.xml&quot;, 
&
quot;w&quot;);fwrite($file, &quot;$mybody&quot;);
fclose($file);
print &
quot;&returnMe=File 
saved
&file=&quot;.$mybody.&quot;&&quot;;}
?>

I downloaded a open source code from the internet...t gives me a erroe..hope experts can fix it :)

Thanks in advance!

22
Programming / Defining Path to a directory using HTML
« on: November 17, 2009, 06:55:57 AM »
Hey.. i have a small problem :)

Dear Experts can u help me !

Here is my folder structure !

|| ROOT
|| - images.xml
|| - index.php
|| - *.SWF


| admin
-- Images
-- games
-- developed
-- php
-- XML
-- admin.swf

now what i need to do is , i need to call the images.xml which is in the root folder.. and im in admin folder..
as you can see/ admin.swf, i need to load the images.xml which is in root folder to admin/admin.swf

hope u got it..can some1 help me....

Thanks in advance !


23
Quote
Warning: Division by zero in /home/g2gayan/public_html/Gallery/includes/functions.php on line 320

Warning: Division by zero in /home/g2gayan/public_html/Gallery/includes/functions.php on line 324

so here is the error message i  get when i open a image newly uploaded... before i ddnt get this..but after the php version of my server changed and ugraded to a new version...the error message stated to appear... so in this case..i used sir V@no's method to remove this... it ddnt work..i modified the global.php ..actually it ddnt work out :(

then I deleted some Code lines  in functions.php..then the error message vanished  :mrgreen:
but i dnt knw what i did  :mrgreen:


306-333 here is the part from my functions.php

Code: [Select]
 $exif_array = array();
  if (is_array($exif)) {
    foreach ($exif as $key => $val) {
      if (isset($exif_match[$key])) {
        $exif_info = $val;
        if ($key == "DateTimeOriginal") {
          $exif_array[$exif_match[$key]] = preg_replace("/([0-9]{4}):([0-9]{2}):([0-9]{2})/", "\\3.\\2.\\1", $exif_info);
        }
        elseif ($key == "ExposureTime") {
 $exposure = explode("/", $exif_info);
          $exif_array[$exif_match[$key]] = "1/" . ($exposure[1] / $exposure[0]);
        }
        elseif ($key == "FNumber") {
 $aperture = explode("/", $exif_info);
          $exif_array[$exif_match[$key]] = "F/" . ($aperture[0] / $aperture[1]);
        }
        elseif ($key == "FocalLength") {
 $focalLen = explode("/", $exif_info);
          $exif_array[$exif_match[$key]] = ($focalLen[0] / $focalLen[1]) . "mm";
        }
        else {
          $exif_array[$exif_match[$key]] = $exif_info;
        }
      }
    }
  }
  return $exif_array;
}

here is the 2 lines that i deleted

Code: [Select]
        $exif_array[$exif_match[$key]] = "F/" . ($aperture[0] / $aperture[1]);

          $exif_array[$exif_match[$key]] = ($focalLen[0] / $focalLen[1]) . "mm";

then the error vanished...but is it okay ? the exif info no more appears :S :S can any 1 help me  8O

Thanks In Adavance !


24
Programming / edit xml from a php or any online driven script
« on: October 24, 2009, 07:47:29 AM »
hey @

i need to know wether its possible to modify , remove,add attributes and tags to a xml file via php ?

can any1 help mee..plsss

25
Chit Chat / 4image Site Collection
« on: October 10, 2009, 03:07:31 AM »
Hey .. I Thought to Start a Thread With The 4image Sites
We All Know that 4 images is used for many purposes for than a image Gallery .. so im gonna include the type of the site and link to it :)

if i have forgotten any..please rem me to add them :)


1.4image as A Gaming Site

2.4images as a Mp3 Sharing Web Site

26
Discussion & Troubleshooting / Error Message ! :(
« on: October 08, 2009, 01:20:28 PM »
Here Is the Error Message I Get :(

Code: [Select]
Warning: array_values() [function.array-values]: The argument should be an array in /home/g2gayan/public_html/users/djneed/onlinegame/includes/functions.php on line 2232

Warning: Wrong parameter count for max() in /home/g2gayan/public_html/users/djneed/onlinegame/includes/functions.php on line 2232

Warning: array_values() [function.array-values]: The argument should be an array in /home/g2gayan/public_html/users/djneed/onlinegame/includes/functions.php on line 2233

Warning: Wrong parameter count for min() in /home/g2gayan/public_html/users/djneed/onlinegame/includes/functions.php on line 2233

Warning: Invalid argument supplied for foreach() in /home/g2gayan/public_html/users/djneed/onlinegame/includes/functions.php on line 2240


I Have Attached my Function PHP and Here is the php coding between lines which erros occured !

Code: [Select]
       $flash_tag_clouds_text = "var so = new SWFObject(\"".TEMPLATE_PATH."/flash_tag_clouds.swf\", \"tagcloud\", \"".$flash_tag_clouds_width."\", \"".$flash_tag_clouds_height."\", \"7\", \"#".$flash_tag_clouds_flashcolor."\"); \n";
        if ($flash_tag_clouds_transparent == 'true') {
        $flash_tag_clouds_text .= "so.addParam(\"wmode\", \"transparent\"); \n";
        }
        $flash_tag_clouds_text .= "so.addVariable(\"tcolor\", \"0x".$flash_tag_clouds_textcolor."\");\n";
        $flash_tag_clouds_text .= "so.addVariable(\"mode\", \"tags\"); \n";
        $flash_tag_clouds_text .= "so.addVariable(\"distr\", \"true\"); \n";
        $flash_tag_clouds_text .= "so.addVariable(\"tspeed\", \"".$flash_tag_clouds_textspeed."\"); \n";
        $flash_tag_clouds_text .= "so.addVariable(\"tagcloud\", \"<tags>";
$sql = "SELECT i.word_id, i.word_text, COUNT(c.word_id) AS quantity
        FROM ".WORDLIST_TABLE." i
        LEFT JOIN ".WORDMATCH_TABLE." c ON i.word_id = c.word_id
        WHERE keys_match > 0
        GROUP BY i.word_text
        ORDER BY  RAND()
        LIMIT $flash_tag_clouds_textlimit";
$result = $site_db->query($sql);
while ($row = $site_db->fetch_array($result)) {
$tags[$row['word_text']] = $row['quantity'];
}
        $max_qty = max(array_values($tags));
        $min_qty = min(array_values($tags));

        $spread = $max_qty - $min_qty;
        if ($spread == 0) {
        $spread = 1;
        }
        $step = ($flash_tag_clouds_size_max - $flash_tag_clouds_size_min) / ($spread);
        foreach ($tags as $key => $value) {
        $size = round($flash_tag_clouds_size_min + (($value - $min_qty) * $step));
        // clean keys for flashtext:
        $key2 = $key;
        $key2 = str_replace('"',' ',$key2);
        $key2 = str_replace('&',' ',$key2);
        $key2 = str_replace('%',' ',$key2);
        $key2 = str_replace('>',' ',$key2);
        $key2 = str_replace('<',' ',$key2);
        $key2 = str_replace('+',' ',$key2);
        //
        $flash_tag_clouds_text .= "<a href='".$site_sess->url(ROOT_PATH."search.php?search_keywords=".$key.((!empty($mode)) ? "&amp;mode=".$mode : ""))."' style='".$size."'>".$key2." [".$value."]</a>";
        }
return $flash_tag_clouds_text;
}
/*----------------------- End MOD Flash-Tag-Clouds by KW ---------------------*/

can some 1 help me please ? :S

I Think its a Thing Cause Due to SIR KURTS MOD !

27
Discussion & Troubleshooting / Upload SwF and View them
« on: October 06, 2009, 10:35:36 AM »
I Found A Swf template file in my media folder..bt i cant upload SWF files to my site..i think i shud edit the mime.php ...any 1 know to do this ?
thanks in advance !

Code: [Select]
image file uploaded: Monster_Memory.swf
Error uploading thumbnail file: Untitled-1.png
Monster_Memory.png: Invalid file type (png, image/png)

image file deleted
No database entry!

28
Hey...

i changed the index.php to display 400 new images in my home page :) now it looks like a mess....can we add buttons or make a pagination system to it so after XX images a next / previuos button or "1" '2" '3" button will be displayed

can any one help me in this case ? i saw a pagination system for comments..but not for this :)

Thanks in Advance !

29
Discussion & Troubleshooting / new thumbs like in chamkani.net
« on: September 25, 2009, 06:50:45 PM »
chamkani.net

Please Have a Look at that web site... he has used some cool structure /...

can i also do it ? see...instead of the thumb he has used the Play button ! can i  also crate a pagination system like that ? i saw a thread in this ofrum ab the same question i saw it has being answered ...

but now..i cant find it :( can any 1 please help me..

Thanks In advance !

30
Hello Guys..i saw a cool pagination System in a web site  8)

I Have Attached  a jpeg screenshot because the site is not available now ! Can Any1 prepare 1 pagination system like this >?

Accorin to my knowledge we have to edit the thumb.html and soem other template files... i dont think it needs any php things....my question is do we need to edit php files to get a pagination like this ?

Please...Some 1 help meee !


Pages: 1 [2] 3 4