форум vBSupport.ru > vBulletin > vBulletin 3.8.x > Вопросы по vBulletin 3.8
  • »
VBsupport перешел с домена .ORG на родной .RU Ура! Пожалуйста, обновите свои закладки - VBsupport.ru
 
 
 
 
GTraxalo
Продвинутый
Default Как вывести блок с Arcade и PhotoPlog на главную форума?
0

У меня форум со стилем Emotion, хочу вывести в левые блоки рандомную фотку с галереи и рандомную игру с аркад...
Как это сделать. подскажите пожалуйста...

Если есть в этом заморочки и надо что то дописывать, то готов платить денюжку ну рубликов 100 кризис (всё что есть на кашельке 119 WMR)
Bot
Yandex Bot Yandex Bot is online now
 
Join Date: 05.05.2005
Реклама на форуме А что у нас тут интересного? =)
 
 
NetworK
Продвинутый
 
NetworK's Avatar
Default
0

Вот рандом игр.

PHP Code:
                $DB->query("SELECT g.gid, g.gtitle, g.gname, g.gcat, cat.password, cat.active FROM ibf_games_list AS g, ibf_games_cats AS cat WHERE g.active=1 AND cat.active=1 AND g.gcat=cat.c_id AND trim(password)='' ORDER BY RAND() LIMIT 1");
                
$firstran true;
                while(
$rangline $DB->fetch_row())
        {
                        if(
$firstran) {
                                
$firstran false;
                        } else {
                                
$ran_games .= "<br />\n";
                        } 
А вот кусок шаблона фоток:

PHP Code:
<td class="alt2" align="center">
<if 
condition="$vboptions[photoplog_highslide_active] AND $photoplog[do_highslide]">
    <
script type="text/javascript">hs.registerOverlay({thumbnailId'hsjs$photoplog[hscnt]'overlayId'hscontrolbar'position'top right'hideOnMouseOuttrue});</script>
    <a id="hsjs$photoplog[hscnt]" href="$photoplog[$photoplog_hslink2]" class="highslide" onclick="return hs.expand(this, {slideshowGroup: 'minithumbpic'})"><img style="$vboptions[photoplog_cssrand_thumbs]" src="$photoplog[$photoplog_hslink1]" alt="$photoplog[title]" border="0" /></a>
    <div class="highslide-caption" id="caption-for-hsjs$photoplog[hscnt]"><a href="$photoplog[location]/index.php?$session[sessionurl]n=$photoplog[fileid]">$photoplog[title]</a>&nbsp;</div>
<else />
    <a href="$photoplog[location]/index.php?$session[sessionurl]n=$photoplog[fileid]"><img style="$vboptions[photoplog_cssrand_thumbs]" src="$photoplog[file_slink]" alt="$photoplog[title]" border="0" /></a>
</if>
</td> 

А вот запрос на эти самые тумбы и инфу к ним.
PHP Code:
$photoplog_cnt_bits 0;
$photoplog['minithumbnails'] = '';
$photoplog['numrand_thumbs'] = intval($vbulletin->options['photoplog_numrand_thumbs']);

if (
    
$vbulletin->options['photoplog_is_active']
        &&
    
$photoplog['numrand_thumbs'] > 0
        
&&
    (
$permissions['photoplogpermissions'] & $vbulletin->bf_ugp_photoplogpermissions['photoplogcanviewfiles'])
)
{
    
$photoplog_sql 'WHERE 1=1';
    
$photoplog_fileid_sql "AND " PHOTOPLOG_PREFIX "photoplog_fileuploads.fileid BETWEEN " intval($photoplog_file_stats_less1) . " AND " intval($photoplog_file_stats_more1);
    if (
THIS_SCRIPT == 'member' && $userinfo['userid'])
    {
        
$photoplog_sql "WHERE " PHOTOPLOG_PREFIX "photoplog_fileuploads.userid = ".intval($userinfo['userid']);
        
$photoplog_fileid_sql '';
    }

    
$photoplog_order_sql 'ORDER BY RAND()';

    (
$hook vBulletinHook::fetch_hook('photoplog_thumbnails_sortsql_random')) ? eval($hook) : false;

    
$photoplog_file_infos $db->query_read_slave("SELECT " PHOTOPLOG_PREFIX "photoplog_fileuploads.fileid,
        " 
PHOTOPLOG_PREFIX "photoplog_fileuploads.catid,
        " 
PHOTOPLOG_PREFIX "photoplog_fileuploads.filename,
        " 
PHOTOPLOG_PREFIX "photoplog_fileuploads.userid,
        " 
PHOTOPLOG_PREFIX "photoplog_fileuploads.title,
        
$photoplog_admin_sql4
        FROM " 
PHOTOPLOG_PREFIX "photoplog_fileuploads
        
$photoplog_sql
        
$photoplog_fileid_sql
        
$photoplog_catid_sql1
        
$photoplog_admin_sql1
        
$photoplog_order_sql
        LIMIT "
.intval($photoplog['numrand_thumbs'])."
    "
);

    
$photoplog_hslink1 'file_'.substr($vbulletin->options['photoplog_highslide_random_thumb'], 01).'link';
    
$photoplog_hslink2 'file_'.substr($vbulletin->options['photoplog_highslide_random_thumb'], -11).'link';

    
$photoplog['do_highslide'] = 0;
    if (
$photoplog_hslink1 != 'file_nlink' && $photoplog_hslink2 != 'file_nlink')
    {
        
$photoplog['do_highslide'] = 1;
    }

    
$photoplog_minithumb_pics '';

    while (
$photoplog_file_info $db->fetch_array($photoplog_file_infos))
    {
        
$photoplog_cnt_bits++;

        
$photoplog['fileid'] = $photoplog_file_info['fileid'];
        
$photoplog['catid'] = $photoplog_file_info['catid'];
        
$photoplog['filename'] = $photoplog_file_info['filename'];
        
$photoplog['userid'] = $photoplog_file_info['userid'];
        
$photoplog['title'] = photoplog_process_text($photoplog_file_info['title'], $photoplog['catid'], truefalse);

        
$photoplog['hscnt'] = intval($photoplog['hscnt']) + 1;

        
photoplog_file_link($photoplog['userid'], $photoplog['fileid'], $photoplog['filename']);

        (
$hook vBulletinHook::fetch_hook('photoplog_thumbnails_minithumbpics')) ? eval($hook) : false;

        eval(
'$photoplog_minithumb_pics .= "' fetch_template('photoplog_minithumb_pics') . '";');
    }

    
$db->free_result($photoplog_file_infos);

    (
$hook vBulletinHook::fetch_hook('photoplog_thumbnails_minithumbnails')) ? eval($hook) : false;

    eval(
'$photoplog[\'minithumbnails\'] = "' fetch_template('photoplog_minithumb_nails') . '";');
}

if (!
$photoplog_cnt_bits)
{
    
$photoplog['minithumbnails'] = '';

 
 
GTraxalo
Продвинутый
Default
0

не догнал...
Например рандомную игру чтоб вставить...
Мне просто вставлять предоставленый вами код в нужное мне место в моём стиле?
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT +4. The time now is 04:39 PM.


Powered by vBulletin® Version 3.6.10
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Loading...