vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Portal Software - [Chris] Rate My Photo (HorOrNot Clone) (https://vborg.vbsupport.ru/showthread.php?t=289735)

Christos Teriakis 10-26-2012 10:00 PM

[Chris] Rate My Photo (HorOrNot Clone)
 
Rate My Photo (Hot or Not Clone)
by ChrisTERiS

IMPORTANT
This is NOT a Gallery addon. It focuses only to photo rating and not to photo presentation


Please note that from
11 Aug 2013
you can get support only in my site
http://www.teriakis.com


Today is my birthday and as the time that I was celebrating the has passed, I decided to release an addon that I had somewhere in my HD. Is not the "killer" addon, but works fine, and as I know there is no other similar addon available.

1.- Installation
  1. Upload all files from upload folder to the folder where your vBulletin 4.2 is installed
  2. CMOD 777 the directories
    1. ratemyphoto/photos
    2. ratemyphoto/photos/thumbs
  3. Login to your admincp and import the file product-ratemyphoto.xml
  4. Set Usergroup permissions
  5. Set General Options according to your needs
  6. If you want modify PM templates but don't touch anything betwee {}
  7. Set the Categories
2.- Requiremenets
  1. Installed and fully operating vBulletin
  2. vBulletin version 4.2
  3. Does NOT works with vBulletin 5 Connect
3.- Copyright Link

In all pages there is my copyright link back to my site. Removing it, or making it invisible is strictly prohibited.

4.- PRO version

During the first week of November 2012, I'll release a commercial (PRO) version with more features and without copyright link in a low price.

Enjoy it
Christos Teriakis

ejbreeze 10-27-2012 08:28 PM

How do you post a photo? The attachment button doesn't work when I click it. Thanks. Nice mod by the way. This is what I see.

https://vborg.vbsupport.ru/external/2012/10/26.png

Christos Teriakis 10-27-2012 08:49 PM

Quote:

Originally Posted by ejbreeze (Post 2376391)
How do you post a photo? The attachment button doesn't work when I click it. Thanks. Nice mod by the way. This is what I see.

What browser are you using? I've tested with IE, FF and Chrome and works, while in your screenshot the upload field is not visible. Only the description below is visible.

Chris

ejbreeze 10-27-2012 08:52 PM

I am using chrome. And yes I only see the description. Let me try with IE.

ejbreeze 10-27-2012 08:55 PM

Same thing with Firefox.

Christos Teriakis 10-28-2012 06:11 AM

Quote:

Originally Posted by ejbreeze (Post 2376399)
Same thing with Firefox.

The 2nd screenshot in my post taken with FF 16.0.2. With Chrome 22.0 also works fine. I assume that you're not trying to upload photo with a device does not supports uploading (eg iPad).

Chris

ejbreeze 10-28-2012 01:38 PM

Reverting back to the default style shows the upload box. Using my purchased custom style it won't show. Any ideas? Everything else seems to work good. Thanks.

Christos Teriakis 10-28-2012 03:37 PM

Quote:

Originally Posted by ejbreeze (Post 2376552)
Reverting back to the default style shows the upload box. Using my purchased custom style it won't show. Any ideas? Everything else seems to work good. Thanks.

In this case, seems that your customized style uses javascript which conflists with the upload box. What I mean. In the upload box there is a javasctipt script which checks the file extension of the file that you're trying to upload in client-side (before send it to server). Most probably this is the issue. To correct it you need to edit the template: ratemyphoto_addedit_photo

Find:
Code:

<input type="file" name="logo" id="logo" onblur="return CheckImageExt(this)" size="25">
Replace it with:
Code:

<input type="file" name="logo" id="logo" size="25">
On the same template (at the top) you must remove all the code below:
Code:

<script type="text/javascript">
                function CheckImageExt(fld)
                {
                        if (fld.value != '')
                        {
                                var image_ext = getFileExtension(fld.value);
                                var valid_images = new Array("jpg","jpeg","gif","png","JPG","JPEG","GIF","PNG");
                                if (valid_images.indexOf(image_ext) > -1)
                                {
                                        return true;
                                }
                                else
                                {
                                        alert('You can upload only .gif, .jpg, .jpeg, .png files.');
                                        fld.value = '';
                                        fld.select();
                                        fld.focus();
                                        return false;
                                }
                        }
                        else
                        {
                                return true;
                        }
                }
</script>               
<script type="text/javascript">
                function getFileExtension(filename)
                {
                        return filename.split('.').pop();
                }
</script>

Christos

ejbreeze 10-28-2012 03:49 PM

Same results with the changes made. Here is my template.

PHP Code:

<script type="text/javascript" src="clientscript/vbulletin-editor.js?v={vb:raw vboptions.simpleversion}"></script>
<
link rel="stylesheet" type="text/css" href="{vb:var vbcsspath}editor.css" />
<
link rel="stylesheet" type="text/css" href="{vb:var vbcsspath}bbcode.css" />
<
script type="text/javascript">
    function 
validateForm_vbform()
    {
        if(
document.forms["vbform"].title.value.length == 0) {
            
alert('{vb:var vbphrase.ratemyphoto_error_title}');
            return 
false;
        }
        if(
document.forms["vbform"].categoryid != undefined){
            if(!
isNaN(document.forms["vbform"].categoryid.value) == 0) {
                
alert('{vb:var vbphrase.ratemyphoto_error_category_number}');
                return 
false;
        }else if(
document.forms["vbform"].categoryid.value ==0){
            
alert("{vb:var vbphrase.ratemyphoto_error_category_zero}");
            return 
false;
        }
        if(
document.forms["vbform"].logo.value.length == 0) {
            
alert('{vb:var vbphrase.ratemyphoto_error_photo}');
            return 
false;
        }        
    }
    return 
true;
}
</
script>


<
form class="block" action="ratemyphoto_usercp.php" method="post" enctype="multipart/form-data" name="vbform" onsubmit="return vB_Editor['{vb:raw editorid}'].prepare_submit(0, {vb:raw vboptions.postminchars})">
<
vb:if condition="$editmode == 0">
    <
h2 class="blockhead">{vb:var vbphrase.ratemyphoto_addnew_photo}</h2>
<
vb:else />
    <
h2 class="blockhead">{vb:var vbphrase.ratemyphoto_edit_photo} {vb:raw title}</h2>
</
vb:if>
<
div class="blockbody formcontrols settings_form_border">
    <
h3 class="blocksubhead">{vb:var vbphrase.ratemyphoto_general_details}</h3>
    <
div class="section">
        <
vb:if condition="$editmode == 0">
            <
div class="blockrow">                    
                <
label>{vb:var vbphrase.ratemyphoto_select_photo}</label>
                <
div class="rightcol">
                   <
input type="file" name="logo" id="logo" size="25">
                    <
class="description">{vb:var vbphrase.ratemyphoto_h_photo}</p>

                </
div>
            </
div>
        </
vb:if>
        <
div class="blockrow">                    
            <
label>{vb:var vbphrase.ratemyphoto_category}</label>
            <
div class="rightcol">
                {
vb:raw selectcategory}
                <
class="description">{vb:var vbphrase.ratemyphoto_h_category}</p>
            </
div>
        </
div>
        <
div class="blockrow">                    
            <
label>{vb:var vbphrase.ratemyphoto_title}</label>
            <
div class="rightcol">
                <
input type="text" name="title" style="width:98%;" value="{vb:raw title}">
                <
class="description">{vb:var vbphrase.ratemyphoto_h_title}</p>
            </
div>
        </
div>        
    </
div>    
    <
h3 class="blocksubhead">{vb:var vbphrase.ratemyphoto_photo_details}</h3>
    <
div class="wysiwyg_block">
        {
vb:raw messagearea}
    </
div>
    <
div class="blockfoot actionbuttons settings_form_border">
        <
div class="group">
            <
input type="submit" class="button" value="{vb:rawphrase save_changes}" onclick="return validateForm_vbform()" tabindex="1" accesskey="s" />
            <
input type="reset" class="button" value="{vb:rawphrase reset_fields}" tabindex="1" accesskey="r" />
            <
input type="hidden" name="s" value="{vb:raw session.sessionhash}" />
            <
input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />
            <
input type="hidden" name="do" value="saveupdatephoto" />
            <
input type="hidden" name="photoid" value="{vb:raw id}" />
            <
input type="hidden" name="userid" value="{vb:raw userid}" />
            <
input type="hidden" name="username" value="{vb:raw username}" />
            <
input type="hidden" name="urlid" value="{vb:raw urlid}" />
            <
input type="hidden" name="oldlogo" value="{vb:raw oldlogo}" />
            <
input type="hidden" name="editmode" value="{vb:raw editmode}" />    
        </
div>
    </
div>
</
div>
</
form>
<
div class="shade footer_copyright">
    
Powered by <a target="_blank" href="http://www.christeris.com/">Rate My Photo</a><br />
    
Copyright &copy2012 by <a target="_blank" href="http://www.christeris.com/">ChrisTERiS</a>
</
div


Christos Teriakis 10-28-2012 04:11 PM

Quote:

Originally Posted by ejbreeze (Post 2376577)
Same results with the changes made. Here is my template.

I was expecting it as my code was a very simple javascript. Nothing special. As it works with the default template, then is a template issue so you need to contact your designer. He knows better what javascript calls has there. As a second thought. Try any other section of your site where there is upload box. Does it works?

Christos

ejbreeze 10-28-2012 04:12 PM

I found the upload box. It is in the upper left hand corner with only a very small portion of the box showing.

ejbreeze 10-28-2012 04:18 PM

Here is a screen shot.

Attachment 142028

Christos Teriakis 10-28-2012 04:37 PM

Quote:

Originally Posted by ejbreeze (Post 2376583)
Here is a screen shot.

Attachment 142028

Then for sure you need to contact your designer and ask for support. Its not a coding issue.

Christos

Christos Teriakis 10-28-2012 04:43 PM

I'm not designer, but you can try this:
Code:

<input type="file" name="logo" id="logo" style="position:relative;" size="30">

ejbreeze 10-28-2012 04:51 PM

That get's it down close but not aligned correctly. What does work if I remove

PHP Code:

id="logo" 

so it looks like this:

PHP Code:

<input type="file" name="logo" size="30"

It seems to function fine now. Do you see any problems keeping it like this? Thanks again and hurry up and come out with your pro version.

Christos Teriakis 10-28-2012 05:05 PM

Quote:

Originally Posted by ejbreeze (Post 2376597)
That get's it down close but not aligned correctly. What does work if I remove

PHP Code:

id="logo" 

so it looks like this:

PHP Code:

<input type="file" name="logo" size="30"

It seems to function fine now. Do you see any problems keeping it like this? Thanks again and hurry up and come out with your pro version.

As long as you've removed the javascript for checking the file extention, the id can be removed without any problem on usage.

Christos

Christos Teriakis 10-28-2012 05:15 PM

If you want to use the javascript check, you can give a try by changing id="logo" to id="photo". Most probably there is another id="logo" in the page (eg the site logo).

ejbreeze 10-28-2012 05:30 PM

That worked changing id="photo" only in the original code. Thanks. I guess my banner logo script was conflicting with your id name. Thanks. Can we purchase now to remove the copyright then get the pro version when it comes out?

Christos Teriakis 10-28-2012 05:34 PM

Quote:

Originally Posted by ejbreeze (Post 2376602)
That worked changing id="photo" only in the original code. Thanks. I guess my banner logo script was conflicting with your id name. Thanks. Can we purchase now to remove the copyright then get the pro version when it comes out?

You can remove it now and when the PRO version comes out you can pay it at that time.

Christos

ejbreeze 10-28-2012 08:37 PM

Thanks. Marked installed.

ejbreeze 10-29-2012 01:25 AM

Will the pro version have clickable image so you can view the full size photos? Example by clicking on the worse rated side bar photo will bring up its full size photo or by clicking on the small thumbnails in Newest Photos for Rating will bring up a full size. Also will it have an option to show best and worse photos in the side bar on forumhome? Thanks.

Christos Teriakis 10-29-2012 06:59 AM

Quote:

Originally Posted by ejbreeze (Post 2376711)
Will the pro version have clickable image so you can view the full size photos? Example by clicking on the worse rated side bar photo will bring up its full size photo or by clicking on the small thumbnails in Newest Photos for Rating will bring up a full size. Also will it have an option to show best and worse photos in the side bar on forumhome? Thanks.

In a brief, yes to all.

Chris

bhdreren 10-29-2012 02:33 PM

how approving will be done?? it says always Awaiting Approval

Christos Teriakis 10-29-2012 03:51 PM

Quote:

Originally Posted by bhdreren (Post 2376813)
how approving will be done?? it says always Awaiting Approval

If you belong in a usergroup with permissions to Moderate, you'll see a menu "Moderate" with a submenu "Approve Photos".
Have you set the permissions per usergroup for Rate My Photo?

Chris

socialteenz 10-30-2012 01:47 PM

How about a widget in forum home?? I mean in the side bar!!

I am gonna install this once my new board is up.

Christos Teriakis 10-30-2012 04:30 PM

Quote:

Originally Posted by socialteenz (Post 2377047)
How about a widget in forum home?? I mean in the side bar!!

I am gonna install this once my new board is up.

If you want a specific one, tell me what exactly do you want to show, and I'll give you the code to build it. I don't use to build predefinied widgets/blocks, but rather I'm including my own block generator which can produce many types of them according to your needs, and furthure more to auto install them in your system.

Chris

socialteenz 10-30-2012 06:04 PM

Quote:

Originally Posted by ChrisTERiS (Post 2377070)
If you want a specific one, tell me what exactly do you want to show, and I'll give you the code to build it. I don't use to build predefinied widgets/blocks, but rather I'm including my own block generator which can produce many types of them according to your needs, and furthure more to auto install them in your system.

Chris

When ever some one upload their photo for rating, it should appear on the side block.

Others should able to rate the photo (If they haven't rated it already). Else, the rating for the photo should be shown.

Thanks.

Christos Teriakis 10-30-2012 06:17 PM

Quote:

Originally Posted by socialteenz (Post 2377091)
When ever some one upload their photo for rating, it should appear on the side block.

Others should able to rate the photo (If they haven't rated it already). Else, the rating for the photo should be shown.

Thanks.

In simple words you mean to show the latest photo. I can do it and release the code here but I'll go one step ahead. By showing the latest photo with its rating (if user has already rated it), has no so much meaning. So I'll show the latest UNRATED by the user photo, and only if there is no one (in case that user has rated all photos), then I'll show the latest photo with the rating.

Chris

socialteenz 10-30-2012 08:00 PM

Quote:

Originally Posted by ChrisTERiS (Post 2377095)
In simple words you mean to show the latest photo. I can do it and release the code here but I'll go one step ahead. By showing the latest photo with its rating (if user has already rated it), has no so much meaning. So I'll show the latest UNRATED by the user photo, and only if there is no one (in case that user has rated all photos), then I'll show the latest photo with the rating.

Chris

Perfect :)

ejbreeze 11-03-2012 10:22 PM

Chris I installed this on my production site and when I click on categories in the admin control area to create categories I get this error,

500 - Malformed Header

The server encountered an internal error or misconfiguration and was unable to complete your request.

I have check permissions and compared them to my test site where it is working and everything is the same. Any ideas?

Christos Teriakis 11-04-2012 02:31 PM

Quote:

Originally Posted by ejbreeze (Post 2378183)
Chris I installed this on my production site and when I click on categories in the admin control area to create categories I get this error,

500 - Malformed Header

The server encountered an internal error or misconfiguration and was unable to complete your request.

I have check permissions and compared them to my test site where it is working and everything is the same. Any ideas?

Your test and your active installation are resist on the same server?

Chris

CoZmicShReddeR 11-04-2012 02:35 PM

I remember using something like this way back when with my phpnuke website... Took me forever to understand where the images are uploaded... I think it probably would be better to have the upload image located on the page someone instead of trying to fish for it through the member settings area... As it is the members setting area on my website is way to overloaded and really a pain in the ass to find anything... Maybe you could build something to customize that area with color coding or a hot or not icon??

ejbreeze 11-04-2012 02:51 PM

Quote:

Originally Posted by ChrisTERiS (Post 2378304)
Your test and your active installation are resist on the same server?

Chris

Yes they are.

Christos Teriakis 11-04-2012 06:42 PM

Quote:

Originally Posted by ejbreeze (Post 2378309)
Yes they are.

That's totally strange. In any case, just 2 solutions to try:

1.- From ratemyphoto_admin.php remove the code (at the top):
Code:

if(@fopen(DIR . '/includes/adminfunctions_cms.php', 'r')==TRUE)
{
  require_once(DIR . '/includes/adminfunctions_cms.php');
  require_once(DIR . '/includes/functions_cms_layout.php');
  $cms_exists = 1;
}

2.- Have you cmod 777 the directories "photos" etc.

Chris

Christos Teriakis 11-04-2012 06:45 PM

Quote:

Originally Posted by CoZmicShReddeR (Post 2378305)
I remember using something like this way back when with my phpnuke website... Took me forever to understand where the images are uploaded... I think it probably would be better to have the upload image located on the page someone instead of trying to fish for it through the member settings area... As it is the members setting area on my website is way to overloaded and really a pain in the ass to find anything... Maybe you could build something to customize that area with color coding or a hot or not icon??

1.- The uploaded images are storing at ratemyphotos/photos/ directory.
2.- I was the only one who never added links at usercp, but 90% of users here want the links there. In anycase, there are also links at the frontend (ratemyphoto.php) file.

Chris

ejbreeze 11-04-2012 07:14 PM

Thanks Chris. When I went to edit that file I saw it was out of order and wouldn't let me overwrite it. So I deleted it and uploaded the original file again. Seems to be working now.

Christos Teriakis 11-04-2012 07:32 PM

Quote:

Originally Posted by ejbreeze (Post 2378396)
Thanks Chris. When I went to edit that file I saw it was out of order and wouldn't let me overwrite it. So I deleted it and uploaded the original file again. Seems to be working now.

That's why you got this server error. For some reason the file during upload cmod to 600 instead of 644 which is the normal.

Chris

Live_Bait 11-09-2012 10:03 AM

Hi, is there any way to add a Gif and let there be animation? I added one and works just no animation. Thanks Love this mod.. waiting for the paid release...

Christos Teriakis 11-09-2012 06:30 PM

Quote:

Originally Posted by Live_Bait (Post 2379644)
Hi, is there any way to add a Gif and let there be animation? I added one and works just no animation. Thanks Love this mod.. waiting for the paid release...

Hi,

Can you tell me the actual dimensions of the gif image that you're trying to upload and the settings that you've (in RateMyPhoto-> General Options) for max width and max height. Be aware that images with animation trying to be resized they're corrupting (there is a way to fix it but needs a lot of work).

Chris

Live_Bait 11-09-2012 10:55 PM

Your Mod is so great.. really .. Just the sound of your answer is not good.. I am talking many people posting possible Gif animations if I said they were allowed...and who knows what size they are and such .. I will just make a note that gif animation is not available.. lol
The Mod is good enough with out it..
Thank you!


All times are GMT. The time now is 06:26 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02358 seconds
  • Memory Usage 1,925KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_code_printable
  • (5)bbcode_php_printable
  • (19)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete