[Request] ScreenSnapr Gallery

Status
Not open for further replies.

Clit

Posting Freak
Feb 25, 2012
1,065
103
How about a script that makes a gallery on your site of all the pictures you screenshot with screensnapr.
4x4 gallery the toppest left is the newest..
 

xHissy

PHP / VB.net Developer
Oct 23, 2011
75
5
You would either have to manually put the links into your site, or re-code screensnapr and get it to insert the links into your mysql.

Well that's the only way I see it working :/

(Might be worth asking donkey to build this into donkey snapper)
 

Kaz

BooYah
Staff member
Nov 16, 2010
3,064
1,025
How about a script that makes a gallery on your site of all the pictures you screenshot with screensnapr.
4x4 gallery the toppest left is the newest..
Like Hissy said, you will need to modify the program to enter the details into the database to record the link/time to display them the way you want to.
Maybe make a request in the Donkeysnapr thread and see if could maybe add this in, however not everybody may want this so the idea will probably get thrown out of the window OR a mysql edition
 

Sledmore

Chaturbate Livestreamer
Staff member
FindRetros Moderator
Jul 24, 2010
5,199
3,934
Wouldn't you just change the FTP details to your website, and then you can run that PHP script to show all the pictures, you could easily modify that to show 4x4 and not sure if possible but to sort via when the file was added, like in cPanel?(not sure if the last bit is possible).
 

RastaLulz

fight teh power
Staff member
May 3, 2010
3,934
3,933
It has the option to uplaod to ScreenSnapr or your own host VIA FTP
If that's the case and Vinnie uploaded his images to his own server, he can use the following script I just whipped up:
PHP:
<?php
 
$number = 4;
 
foreach (glob("path/to/images/*.png") as $filename) {
 
    $file = explode('/', $filename);
 
    $count = count($file) - 1;
 
    echo '<img src="http://example.com/images/' . $file[$count] . '" style="height:70px;width:70px;" /> ';
   
    $number--;
   
    if($number == 0) {
   
        echo '<br />';
       
        $number = 4;
   
    }
       
}
 

Clit

Posting Freak
Feb 25, 2012
1,065
103
If that's the case and Vinnie uploaded his images to his own server, he can use the following script I just whipped up:
PHP:
<?php
 
$number = 4;
 
foreach (glob("path/to/images/*.png") as $filename) {
 
    $file = explode('/', $filename);
 
    $count = count($file) - 1;
 
    echo '<img src="http://example.com/images/' . $file[$count] . '" style="height:70px;width:70px;" /> ';
 
    $number--;
 
    if($number == 0) {
 
        echo '<br />';
     
        $number = 4;
 
    }
     
}

It don't work..
Warning: Invalid argument supplied for foreach() in /home/a4917169/public_html/screensnapr/index.php on line 5
 

Clit

Posting Freak
Feb 25, 2012
1,065
103
Did you change it to the correct path? "No..."

Code:
<?php
 
$number = 4;
 
foreach (glob("http://vinnietalotta.com/screensnapr/*.png") as $filename) {
 
    $file = explode('/', $filename);
 
    $count = count($file) - 1;
 
    echo '<img src="http://vinnietalotta.com/screensnapr/' . $file[$count] . '" style="height:70px;width:70px;" /> ';
 
    $number--;
 
    if($number == 0) {
 
        echo '<br />';
     
        $number = 4;
 
    }
     
}
 

RastaLulz

fight teh power
Staff member
May 3, 2010
3,934
3,933
Code:
<?php
 
$number = 4;
 
foreach (glob("http://vinnietalotta.com/screensnapr/*.png") as $filename) {
 
    $file = explode('/', $filename);
 
    $count = count($file) - 1;
 
    echo '<img src="http://vinnietalotta.com/screensnapr/' . $file[$count] . '" style="height:70px;width:70px;" /> ';
 
    $number--;
 
    if($number == 0) {
 
        echo '<br />';
   
        $number = 4;
 
    }
   
}
It has to be the internal file path, not the "public" one.
 

Clit

Posting Freak
Feb 25, 2012
1,065
103
I tried many variants... still not working... here is directory. there is no sub directories in screensnapr folder.
I put my index.php in screensnapr, could that possibly be it? :\
6qQT1.png
 

RastaLulz

fight teh power
Staff member
May 3, 2010
3,934
3,933
I tried many variants... still not working... here is directory. there is no sub directories in screensnapr folder.
I put my index.php in screensnapr, could that possibly be it? :\
6qQT1.png
I assume that you have it in the same directory as the images? Yes?

If so, then you don't need a path, therefore it should be:
PHP:
foreach (glob("*.png") as $filename) {
 
Status
Not open for further replies.

Users who are viewing this thread

Top