Jump to content
simpilot

ScreenshotCenter 2.0

Recommended Posts

simpilot    2128

Updated to 2.0 3/1/2012 - Now includes pagination

ScreenshotCenter 2.0

phpVMS module to create a screenshot uploading and display system for your phpVMS based VA.

Developed by:

simpilot

www.simpilotgroup.com

Developed on:

phpVMS 2.1.940

php 5.2.11

mysql 5.0.51

apache 2.2.11

Install:

-Download the attached package.

-unzip the package and place the files as structured in the distribution in your root phpVMS install.

-use the screenshotcenter.sql file to create the tables needed in your sql database using phpmyadmin or similar.

-make sure that the file has created three tables in your database - screenshots, screenshots_comments, and secreenshots_ratings.

Create a link for your pilots to get to the ScreenshotCenter

<?php echo url('/Screenshots'); ?>

-Be sure that the "pics" folder ends up in the root as it is structured in the download and has write permissions.

-Templates are generic and will need to be skinned to your site, they do how ever depend on the native phpVMS "error" and "success" divisions, you need to have them in your css or replace them with your own. There may also be a few odd html tags in the template files as I stripped this out of my VA, I had never really intended for it to be released so I never made a plain template structure.

Functions Available.

To display the newest approved screenshot on your site:

<?php Screenshots::show_newest_screenshot(); ?>

To display the newest screenshot by a certain pilot on your site:

<?php Screenshots::get_pilots_newscreenshot('pilotid'); ?>

To display a random approved screenshot on your site:

<?php Screenshots::show_random_screenshot(); ?>

The links to upload, rate, and add comments are only available to logged in members.

The screenshot approval link in the gallery is only available to administrators.

Released under the following license:

Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License

Code hosted on Github - Link In Signature.

  • Like 34

Share this post


Link to post
Share on other sites
Kyle    400

awsome simpilot! you rock! one point!

EVERYONE! If you find this add on useful to your VA, then give simpilot a point!

  • Like 5

Share this post


Link to post
Share on other sites
dimitris    29

well thank you for this add on ! but i upload a picture .jpg but it is not in the list waiting for approval... and not in the gallery. my data base got the name: shots is that a problem ? i have import your .sql file

EDIT: Working fine! i miss a folder !

  • Like 1

Share this post


Link to post
Share on other sites
TAV1702    908

Wow Simpilot. I never saw this one coming. I thought you were going to keep this jewel exclusive for your VA use. I'll have to give this one a go and see how she works out. ;)

  • Like 1

Share this post


Link to post
Share on other sites
TAV1702    908

+1 Simpilot. Got it working great and have begun skinning to fit my site. Now for a quick question. I have the recent screenshot added to my front page, but it is sitting on the right most edge of the block. What file do I need to edit to get that to center up in the middle of the block? I have tried several and no luck yet. I found a file and messed with it but it was already set in echo to center.

have a look see here at Thunder VA

Other than that, it is going great for me and working out as should. ;)

  • Like 1

Share this post


Link to post
Share on other sites
Kyle    400

Just working perfectly! I still have to bug around with the sizes in ObesseBule. But that's no problem!

Share this post


Link to post
Share on other sites
TAV1702    908

Just working perfectly! I still have to bug around with the sizes in ObesseBule. But that's no problem!

That's exactly what I am working on as we speak. It isn't so bad with the template. It just requires major tweaking to make it right. I found max pic size to be nice at 600 instead of 940. That can be found in the screenshots_large.tpl file. that is if the size you are referring to is while viewing the large image of the screenshot

Share this post


Link to post
Share on other sites
mynameiskhan    12

if we want to delete any screenshot what we have to do cant understand that......?

one more question this screeshot system is not accepting PNG files how we can change that so it will accept PNGS also?

Edited by Irfan khan

Share this post


Link to post
Share on other sites
simpilot    2128

if we want to delete any screenshot what we have to do cant understand that......?

one more question this screeshot system is not accepting PNG files how we can change that so it will accept PNGS also?

The only delete type function is in the approval list, if you want to delete something you already approved you will have to change it in the database, something to think about if nother version is written.

It should be uploading png files without issue, my guess is that you are over the allowable file size.. you can change that in screenshots.php on line 56, I set it at 2mb but you can make it bigger if you want.

($_FILES["uploadedfile"]["size"] < 2000000))

  • Like 2

Share this post


Link to post
Share on other sites
TAV1702    908

I solved my issue of the random or recent pic not centering in the blocks on left side of page. It is all in my css file.

Share this post


Link to post
Share on other sites
MrAmsterdam    13

Hi Simpilot,

i would like to thank you very much for this addon!

I just have one question. when you click the following link the half of the image is gone.... is this a template problem or is is possible to open the screenshot out of the gallery in a new window? :-)

http://serious-airlines.com/index.php/Screenshots/large_screenshot?id=2

Thanks in advance,

Lucas

Share this post


Link to post
Share on other sites
TAV1702    908

That is an ObsessBlue template problem. I posted a quick fix for that in this thread I believe. Chnage the max size for the image to like 650 wide or somewhere around there and it will fix it. Just search up in this thread for one made by me. It gives the tpl file to edit.

Share this post


Link to post
Share on other sites
MrAmsterdam    13

That is an ObsessBlue template problem. I posted a quick fix for that in this thread I believe. Chnage the max size for the image to like 650 wide or somewhere around there and it will fix it. Just search up in this thread for one made by me. It gives the tpl file to edit.

Allrighty!! Thanks!!

Share this post


Link to post
Share on other sites
Kyle    400

simpilot,

When i have screenshots and they bulid up in rows but i just want it to be threes in a row but it keeps adding to the sides.

Is there a way to limit Imgs per row?

Share this post


Link to post
Share on other sites
simpilot    2128

The gallery is set up to tile four pics across in a row before it starts another one. You can adjust the template to whatever you would like. There is a while loop in the template that is looking for "4", change that and the surrounding parameters to what you want.

Share this post


Link to post
Share on other sites
Kyle    400

The gallery is set up to tile four pics across in a row before it starts another one. You can adjust the template to whatever you would like. There is a while loop in the template that is looking for "4", change that and the surrounding parameters to what you want.

Thanks simpilot, i'll look into it.

Share this post


Link to post
Share on other sites
TAV1702    908

simpilot,

When i have screenshots and they bulid up in rows but i just want it to be threes in a row but it keeps adding to the sides.

14o4phj.jpg

Is there a way to limit Imgs per row?

Hi I know you were adressing Simpilot, but here is the fix (edit).

Open screenshots_viewer.tpl and find

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

Change the 4 to the number of your choice. 1, 2, or 3. I changed mine to 3 and it works fine.

Edited by TAV1702

Share this post


Link to post
Share on other sites
MrAmsterdam    13

That is an ObsessBlue template problem. I posted a quick fix for that in this thread I believe. Chnage the max size for the image to like 650 wide or somewhere around there and it will fix it. Just search up in this thread for one made by me. It gives the tpl file to edit.

Hi TAV1702,

Could you help me out a little more here? i am looking and searching through the forums... i cant seem to find the topic that provides the solution to my image problem.. :(

i know i am a little pain in the ... but really i searched through almost the whole forum without luck.. or maybe its just me not understanding it.. :mellow:

hope you can help me once again.. :)

Lucas

Share this post


Link to post
Share on other sites
mark1million    159

Hi Dave,

Just a quick one when i use the

<?php Screenshots::get_pilots_newscreenshot('pilotid#'); ?>

I get You Have Not Submitted Any Screenshots, i am using this in the main pilots profile (profile_main.tpl)and passing the variable from that page $pilotcode; Example, <?php Screenshots::get_pilots_newscreenshot('$pilotcode;'); ?> still not working, any suggestions would be greatly appreciated.

Share this post


Link to post
Share on other sites
Jeff    95

Hi TAV1702,

Could you help me out a little more here? i am looking and searching through the forums... i cant seem to find the topic that provides the solution to my image problem.. :(

i know i am a little pain in the ... but really i searched through almost the whole forum without luck.. or maybe its just me not understanding it.. :mellow:

hope you can help me once again.. :)

Lucas

Click This!

Share this post


Link to post
Share on other sites
MrAmsterdam    13

Thanks for the help!! that did it.

Just one more thing and then i will keep quiet for a while :-)

When you look at the right picture @ http://serious-airlines.com/index.php/Screenshots you only see the boost karma button's left side...

is this also in the same file or is that a skinning problem?

Regards,

Lucas

Share this post


Link to post
Share on other sites
Jeff    95

Thanks for the help!! that did it.

Just one more thing and then i will keep quiet for a while :-)

When you look at the right picture @ http://serious-airlines.com/index.php/Screenshots you only see the boost karma button's left side...

is this also in the same file or is that a skinning problem?

Regards,

Lucas

Not quite sure where the "Boost Karma" button is. Maybe I need to sign in to see it. Anyways, there are a few bits of coding that can help you getting those pages looking a lot better, and might fix your problem as well...

In that tpl file, place this code in line 1

<div class="mcright">

and at the bottom of the page, place this

</div>

If the footer does not go back to the bottom where it belongs, keep placing </div> until it does.

Also, in the ObsessBlue/header.tpl find this code:

<div class="mc01t">
MAIN MENU
</div>

it's around line 104. And change it to this:

<div class="mc01t2">
MAIN MENU
</div>

That will fix the MAIN MENU title on the left of your pages.

If you are still having problems with it, PM me and I'll help you get it sorted ou.

Share this post


Link to post
Share on other sites
mark1million    159

It is possible as i use the same skin and its not too difficult to change things the way you want them, click my signature for a demo, i have also added a clickable url to the main screenshot page from the random image.

Nice addition Dave. Thanks for sharing.

Share this post


Link to post
Share on other sites
simpilot    2128

Hi Dave,

Just a quick one when i use the

<?php Screenshots::get_pilots_newscreenshot('pilotid#'); ?>

I get You Have Not Submitted Any Screenshots, i am using this in the main pilots profile (profile_main.tpl)and passing the variable from that page $pilotcode; Example, <?php Screenshots::get_pilots_newscreenshot('$pilotcode;'); ?> still not working, any suggestions would be greatly appreciated.

The "pilotid#" variable will vary in which template you are showing it. In your profile page it is

$userinfo->pilotid

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


×