Jump to content

ScreenshotCenter 2.0


simpilot

Recommended Posts

  • Administrators

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

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

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

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

Link to comment
Share on other sites

  • Administrators

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

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • Administrators

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.

Link to comment
Share on other sites

  • Moderators

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.

Link to comment
Share on other sites

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

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

Link to comment
Share on other sites

  • Moderators

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.

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

  • Administrators

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

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