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


All times are GMT. The time now is 02:32 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.01961 seconds
  • Memory Usage 1,815KB
  • 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
  • (3)bbcode_code_printable
  • (1)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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