Jump to content
simpilot

ScreenshotCenter 2.0

Recommended Posts

This should be that your looking for :)

Its in the Pageination.class.php at the bottom where the url are created,

This si what i done from line 179 to 204,

$output .= sprintf('<a href="' . $link . '">«</a>', '1');
     }

     if ($currentPage > 1){
        $output .= sprintf('<a href="' . $link . '"> Previous </a>', $currentPage - 1);
     }

     for ($i = $loopStart; $i <= $loopEnd; $i++)
     {
        if ($i == $currentPage){
           $output .= '' . $i . ' ';
        } else {
           $output .= sprintf('<a href="' . $link . '">', $i) . $i . '</a> ';
        }
     }

     if ($currentPage < $totalPages){
        $output .= sprintf('<a href="' . $link . '"> Next </a>', $currentPage + 1);
     }

     if ($loopEnd != $totalPages){
        $output .= sprintf('<a href="' . $link . '">»</a>', $totalPages);
     }

     return ' ' . $output . ' ';
  }

Share this post


Link to post
Share on other sites

I tried that, but still did not work. :(

EDIT: Got it working. Thanks guys.

Edited by Vansers

Share this post


Link to post
Share on other sites

Dave and Mark,

It is working as it should. Thank you.

Have a great weekend.

Regards,

Cor

Share this post


Link to post
Share on other sites

Simpilot i fallow all the instructions but i don't know if i need upload de file pics into the my site,because when i upload a screenhot show me this error Warning: move_uploaded_file(pics/1288714322_teste.jpg) [function.move-uploaded-file]: failed to open stream: No such file or directory in /home/aviancav/public_html/acars/core/modules/Screenshots/Screenshots.php on line 59

Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpmjsYTW' to 'pics/1288714322_teste.jpg' in /home/aviancav/public_html/acars/core/modules/Screenshots/Screenshots.php on line 59

There was an error uploading the file, please try again!

How I can fix this ?

Share this post


Link to post
Share on other sites

Simpilot i fallow all the instructions but i don't know if i need upload de file pics into the my site,because when i upload a screenhot show me this error Warning: move_uploaded_file(pics/1288714322_teste.jpg) [function.move-uploaded-file]: failed to open stream: No such file or directory in /home/aviancav/public_html/acars/core/modules/Screenshots/Screenshots.php on line 59

Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpmjsYTW' to 'pics/1288714322_teste.jpg' in /home/aviancav/public_html/acars/core/modules/Screenshots/Screenshots.php on line 59

There was an error uploading the file, please try again!

How I can fix this ?

Do you have a folder named "pics" in your root directory of your phpvms install and if so, is it writable?

Share this post


Link to post
Share on other sites

Can we just update the files if we already have the screenshot center installed or must we update the sql as well? Already have quite a few pics in I hate to loose. Just curious and thanks again for all your hard work Simpilot!

Share this post


Link to post
Share on other sites

Can we just update the files if we already have the screenshot center installed or must we update the sql as well? Already have quite a few pics in I hate to loose. Just curious and thanks again for all your hard work Simpilot!

The database structure has not changed so if you already have it installed you should be fine just updating the files and leaving the database as is. B)

Share this post


Link to post
Share on other sites

i got one question...

i got everything set up and in the proper places...any everything looks the way it should.....i upload the screenshot and when i go to approve it, it says that none are waiting to be approved

the file size is small on the one i'm uploading, the pics folder is writable

Share this post


Link to post
Share on other sites

It works great for me but I get this Warning

Warning: move_uploaded_file() [function.move-uploaded-file]: open_basedir restriction in effect. File(/tmp/phpjV7onP) is not within the allowed path(s): (/home/simaerobatic/) in /home/simaerobatic/htdocs/AMI/core/modules/Screenshots/Screenshots.php on line 59

The file 1294957092_AB212Venice2.jpg has been uploaded - An Administrator will approve the screenshot prior to it being available in the gallery.

any idea what causes that error and how I can get rid of it?

thanks in advance

Thomas

Share this post


Link to post
Share on other sites
open_basedir restriction in effect

This setting in php needs to be changed on your server. What type of hosting is this?

Share this post


Link to post
Share on other sites

This setting in php needs to be changed on your server. What type of hosting is this?

it is a payed hosting service which runs on an Debian/linux based server

but I am not sure if I have enough rights to change Php settings

Share this post


Link to post
Share on other sites

Try asking your host if they can change the setting for your server space, if they will not, find out if you can put a custom php.ini file in your server root.

Share this post


Link to post
Share on other sites

Try asking your host if they can change the setting for your server space, if they will not, find out if you can put a custom php.ini file in your server root.

How did mark1million (easyjetva.com) change the dimensions of the image so that it is automatically scaled to fit the webpage? Because when i upload a screenshot it is cut into half or even more :( because my page is narrow (obsess blue). Thank You Very Much!

Share this post


Link to post
Share on other sites

1 .- as an image is deleted.

2 .- where images are saved

When an image is rejected from the approval screen it is marked as rejected in the database but it remains in the folder. You can manually delete it if you would like.

All the screenshots are saved in the root/pics folder.

Share this post


Link to post
Share on other sites

How did mark1million (easyjetva.com) change the dimensions of the image so that it is automatically scaled to fit the webpage? Because when i upload a screenshot it is cut into half or even more :( because my page is narrow (obsess blue). Thank You Very Much!

Look for the image string in the template files, there is a style function added to it

style="max-width: 800px;"

and change it to how wide you need it to be.

Share this post


Link to post
Share on other sites

Look for the image string in the template files, there is a style function added to it

style="max-width: 800px;"

and change it to how wide you need it to be.

You also need to change the display from the default 4 images wide to 3 ;) Its in the code there.

Share this post


Link to post
Share on other sites

Ok now i am back at a pc i can help you better,

Find the file in the screenshots folder screenshots_viewer.tpl there are a couple of adjustments you need to make to the code from displaying 4 pictures wide to 3 which fits in with the skin you are using.

For me its line 65,

if ($tiles == '3') { echo '</tr>'; $tiles=0; }

default code is,

if ($tiles == '4')

Change the 4 to a 3, there are a couple of other tpl files you need to do this with as well.

Share this post


Link to post
Share on other sites

Sorry To Start This Again But I added the random screenshot thing to my sidebar however unfortunately it says this:

Notice: The template file "/home/brtvirtu/public_html//lib/skins/ObsessBlue/Screenshots/screenshots_random.tpl" doesn't exist in /home/brtvirtu/public_html/core/classes/TemplateSet.class.php on line 248

sidebar%20random%20screenshot%20error.jpg

Share this post


Link to post
Share on other sites

Sorry To Start This Again But I added the random screenshot thing to my sidebar however unfortunately it says this:

Notice: The template file "/home/brtvirtu/public_html//lib/skins/ObsessBlue/Screenshots/screenshots_random.tpl" doesn't exist in /home/brtvirtu/public_html/core/classes/TemplateSet.class.php on line 248

sidebar%20random%20screenshot%20error.jpg

Share this post


Link to post
Share on other sites
Notice: The template file "/home/brtvirtu/public_html//lib/skins/ObsessBlue/Screenshots/screenshots_random.tpl" doesn't exist

The template file is not there or it is corrupted.

Share this post


Link to post
Share on other sites

I am willing to bet the screenshots folder went to your core templates folder and not the skins /yourtemplate/folder

I had the exact smae problem. Once I moved the screenshots folder from the core to my skin folder all was well.

So it should be like root/lib/skins/crystal/screenshots

if it is in root/core/templates/screenshots it will give that error. At least it did for me.

  • Like 2

Share this post


Link to post
Share on other sites

Wait so what files are corrupted? Everything works (the gallery itself + uploading images).

Please Help

The answer is in the error message

Notice: The template file "/home/brtvirtu/public_html//lib/skins/ObsessBlue/Screenshots/screenshots_random.tpl" doesn't exist

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×