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)

macroforum 12-17-2012 11:23 AM

Installed and nominated, works perfect for me!
One question: wich features has commercial version ?
I would lightbox or similar effects :)
Thanks
Antonio

tounet 12-18-2012 12:34 AM

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

I want to show the best picture on the sidebar of forumhome soon as I can get the code for widgets/blocks

tounet 01-01-2013 11:49 AM

I edit the php file with the following code ratemyphoto

PHP Code:

<?php 

global $vbulletin;
 
// Setup PHP Enviropment
    
error_reporting(E_ALL & ~E_NOTICE);
    
// Define Contants
    
define('THIS_SCRIPT''ratemyphoto');
    
define('GET_EDIT_TEMPLATES''add,edit');
    
// Cache Templates & Variables
    // get special phrase groups
    
$phrasegroups = array(
        
'ratemyphoto',
        
'postbit',
        
'posting'
    
);
    
$specialtemplates = array(
        
'smiliecache',
        
'bbcodecache',
        
'attachmentcache',
    );
// Best Photo
  
$globaltemplates = array(
        
'block-photo',
        
'bbcode_code',
        
'bbcode_html',
        
'bbcode_php',
        
'bbcode_quote',
        
'editor_toolbar_on'
    
);
// Include Globals
    
require_once('./global.php');
    require_once(
'./includes/functions_editor.php');
    require_once(
'./includes/functions_newpost.php');
    require_once(
'./includes/functions_user.php');
    require_once(
'./includes/class_bbcode.php');
    require_once(
'./includes/class_image.php');
    require_once(
'./includes/functions_bigthree.php');
    require_once(
'./includes/class_dm.php');
    require_once(
'./includes/class_dm_pm.php');
    require_once(
'./ratemyphoto/includes/functions.php');
    require_once(
'./includes/class_bootstrap_framework.php');
    
vB_Bootstrap_Framework::init();
    
    
$bestphoto =$vbulletin->db->query_first("SELECT * FROM vb_ratemyphoto_photos WHERE approved=1 AND hidden=0 AND rating>0 ORDER BY rating DESC, votes DESC LIMIT 1");
    
$besttitle htmlspecialchars_uni($bestphoto["title"]);
    
$bestphotoname $bestphoto["logo"];
    
$bestvotes $bestphoto["votes"];
    
$bestrating $bestphoto["rating"];
        
$templater vB_Template::create('block-photo');
        
$templater->register_page_templates();
    
$templater->register('besttitle'$besttitle);
    
$templater->register('bestphotoname'$bestphotoname);
        
print_output ($templater->render());
?>

This will display the best picture.

and I'm writing a new template block-photo

HTML Code:

<div class="block smaller">
        <div class="blocksubhead">
                <span class="blocktitle">
                        <vb:if condition="$catid == 0">
                                {vb:var vbphrase.ratemyphoto_best_overall}
                        <vb:else />
                                {vb:var vbphrase.ratemyphoto_best_category}
                        </vb:if>
                </span>
        </div>
        <div class="widget_content blockbody floatcontainer">
                <div class="blockrow" align="center">
                        <img border="0" src="ratemyphoto/photos/thumbs/{vb:raw bestphotoname}"><br />
                        {vb:raw besttitle}<br />
                        {vb:var vbphrase.ratemyphoto_by}: <a href="member.php?u={vb:raw bestuserid}&tab=ratemyphoto#ratemyphoto">{vb:raw bestusername}</a><br />
                        {vb:var vbphrase.ratemyphoto_votes}: <b>{vb:raw bestvotes}</b><br />
                        {vb:var vbphrase.ratemyphoto_rating}: <b>{vb:raw bestrating}</b>
                </div>
        </div>
</div>       
<div class="underblock"></div>

I created a block for my sidebare but the image does not appear, or it appears alone overwriting any forum

tounet 01-02-2013 06:47 PM

if you want to display the home page ratemyphoto with highslide effects change the following template: ratemyphoto_newest_photos by :

HTML Code:

<script type="text/javascript" src="http://www.yoursite.com/forum/highslide/highslide-with-gallery.js"></script>
<link rel="stylesheet" type="text/css" href="http://www.yoursite.com/forum/highslide/highslide.css" />
<script type="text/javascript">
hs.graphicsDir = 'http://www.yoursite.com/forum/highslide/graphics/';
hs.align = 'center';
hs.transitions = ['expand', 'crossfade'];
hs.outlineType = 'rounded-white';
hs.fadeInOut = true;
hs.numberPosition = 'caption';
hs.dimmingOpacity = 0.75;
 
// Add the controlbar
if (hs.addSlideshow) hs.addSlideshow({
        //slideshowGroup: 'group1',
        interval: 5000,
        repeat: false,
        useControls: true,
        fixedControls: 'fit',
        overlayOptions: {
                opacity: .75,
                position: 'bottom center',
                hideOnMouseOut: true
        }
});
</script>
<div class="highslide-gallery">

<td class="blockrow" >
<a id="thumb1" href="ratemyphoto/photos/{vb:raw newestphotoname}" class="highslide" onclick="return hs.expand(this, { slideshowGroup: 1 } )">

        <img src="ratemyphoto/photos/thumbs/{vb:raw newestphotoname}" alt="{vb:raw newestphotoname}"
                title="Click pour agrandir la photo."  />
</a><br/>
        {vb:raw newesttitle}<br />
        {vb:var vbphrase.ratemyphoto_by}: <a href="member.php?u={vb:raw newestuserid}&tab=ratemyphoto#ratemyphoto">{vb:raw newestusername}</a><br />
        {vb:var vbphrase.ratemyphoto_in}: <a href="ratemyphoto.php?do=main&catid={vb:raw newestcatid}">{vb:raw newestcategory}</a><br />
        {vb:var vbphrase.ratemyphoto_votes}: <b>{vb:raw newestvotes}</b><br/>
        {vb:var vbphrase.ratemyphoto_rating}: <b>{vb:raw newestrating}</b>

</td>
</div>

do not forget to create a directory that contains the files highslide:
  1. highslide-with-gallery.js
  2. highslide.css
  3. subdirectory graphics

download it in highslide site her

Attachment 143154 Attachment 143155
enjoy!

Tyran1 05-09-2013 04:06 PM

Version for 3.8.7??

Christos Teriakis 08-11-2013 05:16 PM

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


All times are GMT. The time now is 04:55 PM.

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.01218 seconds
  • Memory Usage 1,766KB
  • 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
  • (2)bbcode_html_printable
  • (1)bbcode_php_printable
  • (1)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
  • (6)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