Jump to content

ScreenshotCenter 2.0


simpilot

Recommended Posts

  • Moderators

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 . ' ';
  }

Link to comment
Share on other sites

  • 3 weeks later...

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 ?

Link to comment
Share on other sites

  • Administrators

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?

Link to comment
Share on other sites

  • 3 weeks later...
  • Administrators

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)

Link to comment
Share on other sites

  • 3 weeks later...

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

Link to comment
Share on other sites

  • 4 weeks later...

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

Link to comment
Share on other sites

  • 3 weeks later...

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!

Link to comment
Share on other sites

  • Administrators

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.

Link to comment
Share on other sites

  • Administrators

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.

Link to comment
Share on other sites

  • Moderators

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.

Link to comment
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
Link to comment
Share on other sites

  • Administrators

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
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...