форум vBSupport.ru > Форумные движки и CMS (Порталы) > CMS (Portals) > vBadvanced CMPS
Register Меню vBsupport Изображения Files Manager О рекламе Today's Posts Search
  • Родная гавань
  • Блок РКН снят
  • Premoderation
  • For English speaking users
  • Каталог Фрилансеров
  • If you want to buy some product or script
  • Администраторам
VBsupport перешел с домена .ORG на родной .RU Ура! Пожалуйста, обновите свои закладки - VBsupport.ru
Блок РКН снят, форум доступен на всей территории России, включая новые терртории, без VPN
На форуме введена премодерация ВСЕХ новых пользователей

Почта с временных сервисов, типа mailinator.com, gawab.com и/или прочих, которые предоставляют временный почтовый ящик без регистрации и/или почтовый ящик для рассылки спама, отслеживается и блокируется, а так же заносится в спам-блок форума, аккаунты удаляются
for English speaking users:
You may be surprised with restriction of access to the attachments of the forum. The reason is the recent change in vbsupport.org strategy:

- users with reputation < 10 belong to "simple_users" users' group
- if your reputation > 10 then administrator (kerk, Luvilla) can decide to move you into an "improved" group, but only manually

Main idea is to increase motivation of community members to share their ideas and willingness to support to each other. You may write an article for the subject where you are good enough, you may answer questions, you may share vbulletin.com/org content with vbsupport.org users, receiving "thanks" equal your reputation points. We should not only consume, we should produce something.

- you may:
* increase your reputation (doing something useful for another members of community) and being improved
* purchase temporary access to the improved category:
10 $ for 3 months. - this group can download attachments, reputation/posts do not matter.
20 $ for 3 months. - this group can download attachments, reputation/posts do not matter + adds eliminated + Inbox capacity increased + files manager increased permissions.

Please contact kerk or Luvilla regarding payments.

Important!:
- if your reputation will become less then 0, you will be moved into "simple_users" users' group automatically.*
*for temporary groups (pre-paid for 3 months) reputation/posts do not matter.
Уважаемые пользователи!

На форуме открыт новый раздел "Каталог фрилансеров"

и отдельный раздел для платных заказов "Куплю/Закажу"

Если вы хотите приобрести какой то скрипт/продукт/хак из каталогов перечисленных ниже:
Каталог модулей/хаков
Ещё раз обращаем Ваше внимание: всё, что Вы скачиваете и устанавливаете на свой форум, Вы устанавливаете исключительно на свой страх и риск.
Сообщество vBSupport'а физически не в состоянии проверять все стили, хаки и нули, выкладываемые пользователями.
Помните: безопасность Вашего проекта - Ваша забота.
Убедительная просьба: при обнаружении уязвимостей или сомнительных кодов обязательно отписывайтесь в теме хака/стиля
Спасибо за понимание
 
 
 
 
dr Vatson
Почти новичок
Question Как создать центральное расположение страницы ?
0

Приветствую всех, вопрос к Kerk т.к. этот форум его, ну и ко всем кто знает ответ на мой вопрос))

Как сделать такое центральное расположение страницы как на главной в Vbadvance на главной в Vbsupport ?

Нужно сделать такое как на фото в две колонки

Bot
Yandex Bot Yandex Bot is online now
 
Join Date: 05.05.2005
Реклама на форуме А что у нас тут интересного? =)
 
 
SMak044
Эксперт
 
SMak044's Avatar
Default
0

dr Vatson, ну я например сделал так
http://www.oriflame.kashglobal.org/index.php
  1. Создаем шаблон
    Пример моего
    HTML Code:
    <table style="width: 100%" cellpadding="0" cellspacing="0">
    <tr>
    <td style="vertical-align: top; max-width: 49%; min-width: 49%;">
    <table style="width: 100%" cellpadding="0" cellspacing="0">
    	<tr>
    		<td>
    			<div style="padding-bottom:$vba_style[portal_vspace]px">
    				<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
    					<thead>
    						<tr>
    							<td class="tcat" colspan="$mods[colspan]">
    								<span class="smallfont"><strong>$vba_style[portal_blockbullet] $fporiflamenewstitle</strong></span>
    							</td>
    						</tr>
    					</thead>
    					<tbody style="$modcollapse">
    						<tr>
    							<td class="alt1" colspan="$mods[colspan]" align="center">
    								<table cellpadding="0" cellspacing="0"  width="100%">
    									$oriflamenews
    								</table>					
    							</td>
    						</tr>
                 		</tbody>
    				</table>
    			</div>
    		</td>
    	</tr>
    	<tr>
    		<td>
    			<div style="padding-bottom:$vba_style[portal_vspace]px">
    				<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
    					<thead>
    						<tr>
    							<td class="tcat" colspan="$mods[colspan]">
    								<span class="smallfont"><strong>$vba_style[portal_blockbullet] $fporiflameactionstitle</strong></span>
    							</td>
    						</tr>
    					</thead>
    					<tbody style="$modcollapse">
    						<tr>
    							<td class="alt1" colspan="$mods[colspan]" align="center">
    								<table cellpadding="0" cellspacing="0"  width="100%">
    									$oriflameactions
    								</table>					
    							</td>
    						</tr>
                 		</tbody>
    				</table>
    			</div>
    		</td>
    	</tr>
    	<tr>
    		<td style="text-align: center;">
    			<div style="padding-bottom:$vba_style[portal_vspace]px">
    				<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
    					<thead>
    						<tr>
    							<td class="tcat" colspan="$mods[colspan]">
    								<span class="smallfont"><strong>$vba_style[portal_blockbullet] $fpvideotitle</strong></span>
    							</td>
    						</tr>
    					</thead>
    					<tbody style="$modcollapse">
    						<tr>
    							<td class="alt1" colspan="$mods[colspan]" align="center">
    								<div id="videoarea">
    									<object width="320" height="180">
                    						<param name="movie" value="$vlink"></param>
                    						<param name="allowFullScreen" value="true"></param>
                    						<param name="allowScriptAccess" value="always"></param>
                    						<embed src="$vlink"
                      							type="application/x-shockwave-flash"
                      							allowfullscreen="true"
                      							allowscriptaccess="always"
                      							width="320" height="180">
                    						</embed>
                    					</object>
                 					</div>
                 					$relatevideo					
    							</td>
    						</tr>
                 		</tbody>
    				</table>
    			</div>
    		</td>
    	</tr>
    </table>		
    </td>
    <td style="width:10px">&nbsp;</td>
    <td style="vertical-align: top;">
    <table style="width: 100%" cellpadding="0" cellspacing="0">
    	<tr>
    		<td>
    			<div style="padding-bottom:$vba_style[portal_vspace]px">
    				<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
    					<thead>
    						<tr>
    							<td class="tcat" colspan="$mods[colspan]">
    								<span class="smallfont"><strong>$vba_style[portal_blockbullet] $fpkashglobalnewstitle</strong></span>
    							</td>
    						</tr>
    					</thead>
    					<tbody style="$modcollapse">
    						<tr>
    							<td class="alt1" colspan="$mods[colspan]" align="center">
    								<table cellpadding="0" cellspacing="0"  width="100%">
    									$kashglobalnews
    								</table>					
    							</td>
    						</tr>
                 		</tbody>
    				</table>
    			</div>
    		</td>
    	</tr>
    	<tr>
    		<td>
    			<div style="padding-bottom:$vba_style[portal_vspace]px">
    				<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
    					<thead>
    						<tr>
    							<td class="tcat" colspan="$mods[colspan]">
    								<span class="smallfont"><strong>$vba_style[portal_blockbullet] $fpkashglobalactionstitle</strong></span>
    							</td>
    						</tr>
    					</thead>
    					<tbody style="$modcollapse">
    						<tr>
    							<td class="alt1" colspan="$mods[colspan]" align="center">
    								<table cellpadding="0" cellspacing="0"  width="100%">
    									$kashglobalactions
    								</table>					
    							</td>
    						</tr>
                 		</tbody>
    				</table>
    			</div>
    		</td>
    	</tr>
    	<tr>
    		<td>Конкурсы kashglobal</td>
    	</tr>
    </table>
    </td>
    </tr>
    </table>
  2. Создаем php модуль
    Пример моего файла
    PHP Code:
    <?php
    // ++=========================================================================++
    // || vBadvanced CMPS v3.2.2 (для vBulletin 3.6 - 3.8) - Русская версия
    // || © 2003-2010 vBadvanced.com - Все права защищены
    // || Русский перевод: Lazek и zCarot
    // ++ ========================================================================++

    global $vbulletin;

    // Новости Oriflame
    $fporiflamenewstitle 'Новости Oriflame';

    $selectforumid "5,22,23";
    $selectlimit 5;
    $selectlastpost 0;
    $lastpost "dateline";

    if (
    $selectlastpost == 1)
      {
        
    $lastpost "lastpost";
      }

    $threads $db->query_read("
        SELECT post.pagetext
             , thread.title
             , thread.threadid
        FROM " 
    TABLE_PREFIX "thread as thread
        INNER JOIN " 
    TABLE_PREFIX "post as post
        ON thread.firstpostid = post.postid    
        WHERE thread.forumid IN (" 
    $selectforumid ") AND thread.visible = 1
        ORDER BY thread." 
    $lastpost " DESC
        LIMIT " 
    $selectlimit "
        "
    );

    $contents "";

    while (
    $thread $db->fetch_array($threads))
    {
      
    $titlethread $thread['title'];
      
    $titlethreadid $thread['threadid'];
      
    $thredcontent $thread['pagetext'];
        
    $thredcontent strip_quotes($thredcontent);
      
    $pattern '/\[IMG\].*?\[\/IMG\]/si';
      
    $replacement '';
      
    $thredcontent preg_replace($pattern$replacement$thredcontent);    
      
    $thredcontent htmlspecialchars_uni(fetch_censored_text(fetch_trimmed_title(
                
    strip_bbcode($thredcontentfalsetrue),
                
    $vbulletin->options['threadpreview']
            )));

      eval(
    '$contents  .= "' fetch_template('adv_portal_fpmininewsbits') . '";');    
    }

    $oriflamenews $contents;

    // Новости KASH Global
    $fpkashglobalnewstitle 'Новости KASH Global';

    $selectforumid "2,9,10";
    $selectlimit 5;
    $selectlastpost 0;
    $lastpost "dateline";

    if (
    $selectlastpost == 1)
      {
        
    $lastpost "lastpost";
      }

    $threads $db->query_read("
        SELECT post.pagetext
             , thread.title
             , thread.threadid
        FROM " 
    TABLE_PREFIX "thread as thread
        INNER JOIN " 
    TABLE_PREFIX "post as post
        ON thread.firstpostid = post.postid    
        WHERE thread.forumid IN (" 
    $selectforumid ") AND thread.visible = 1
        ORDER BY thread." 
    $lastpost " DESC
        LIMIT " 
    $selectlimit "
        "
    );

    $contents "";

    while (
    $thread $db->fetch_array($threads))
    {
      
    $titlethread $thread['title'];
      
    $titlethreadid $thread['threadid'];
      
    $thredcontent $thread['pagetext'];
        
    $thredcontent strip_quotes($thredcontent);
      
    $pattern '/\[IMG\].*?\[\/IMG\]/si';
      
    $replacement '';
      
    $thredcontent preg_replace($pattern$replacement$thredcontent);    
      
    $thredcontent htmlspecialchars_uni(fetch_censored_text(fetch_trimmed_title(
                
    strip_bbcode($thredcontentfalsetrue),
                
    $vbulletin->options['threadpreview']
            )));

      eval(
    '$contents  .= "' fetch_template('adv_portal_fpmininewsbits') . '";');    
    }

    $kashglobalnews $contents;

    // Акции Oriflame
    $fporiflameactionstitle 'Акции Oriflame';

    $selectthreadid "2338";
    $selectlimit 5;

    $posts $db->query_read("
      SELECT post.postid
           , post.threadid
           , post.title
           , post.pagetext
      FROM " 
    TABLE_PREFIX "post as post
      WHERE post.threadid IN (0," 
    $selectthreadid ")
      ORDER BY post.dateline DESC
      LIMIT " 
    $selectlimit "
    "
    );

    $contents "";

    while (
    $post $db->fetch_array($posts))
    {
      
    $postid $post['postid'];
      
    $posttitle $post['title'];
      
    $thredid $post['threadid'];
      
    $postcontent $post['pagetext'];
      
    $postcontent strip_quotes($postcontent);
      
    $pattern '/\[IMG\].*?\[\/IMG\]/si';
      
    $replacement '';
      
    $postcontent preg_replace($pattern$replacement$postcontent);    
      
    $postcontent htmlspecialchars_uni(fetch_censored_text(fetch_trimmed_title(
                
    strip_bbcode($postcontentfalsetrue),
                
    $vbulletin->options['threadpreview']
            )));

      eval(
    '$contents  .= "' fetch_template('adv_portal_fpmininewsbits_post') . '";');    
    }

    $oriflameactions $contents;

    // Акции KASH Global
    $fpkashglobalactionstitle 'Акции KASH Global';

    $selectthreadid "2339";
    $selectlimit 5;

    $posts $db->query_read("
      SELECT post.postid
           , post.threadid
           , post.title
           , post.pagetext
      FROM " 
    TABLE_PREFIX "post as post
      WHERE post.threadid IN (0," 
    $selectthreadid ")
      ORDER BY post.dateline DESC
      LIMIT " 
    $selectlimit "
    "
    );

    $contents "";

    while (
    $post $db->fetch_array($posts))
    {
      
    $postid $post['postid'];
      
    $posttitle $post['title'];
      
    $thredid $post['threadid'];
      
    $postcontent $post['pagetext'];
      
    $postcontent strip_quotes($postcontent);
      
    $pattern '/\[IMG\].*?\[\/IMG\]/si';
      
    $replacement '';
      
    $postcontent preg_replace($pattern$replacement$postcontent);    
      
    $postcontent htmlspecialchars_uni(fetch_censored_text(fetch_trimmed_title(
                
    strip_bbcode($postcontentfalsetrue),
                
    $vbulletin->options['threadpreview']
            )));

      eval(
    '$contents  .= "' fetch_template('adv_portal_fpmininewsbits_post') . '";');    
    }

    $kashglobalactions $contents;
      

    // Видео про Oriflame
    $fpvideotitle 'Видео';

    include(
    DIR '../youtube.inc.php');
    $ytObject = new youTube();
    $term '2012 oriflame орифлейм';
    $term '2012 орифлейм oriflame';
    $relatevideo '';

    if(
    $ytObject->search($term6))

        if( 
    count($ytObject->RKT_requestResult->entry) > )
      {
          
    $count 1;
          
    $relatevideo .= '<table style="width: 100%" cellpadding="0" cellspacing="0"><tr>';
              
        foreach (
    $ytObject->RKT_requestResult->entry as $video
        {
          if(
    $count == 1)
          {
            
    $v $ytObject->parseVideoRow($video);
            
    $vlink $v['videoLink'];
            
    $pattern '/watch\?v=/si';
            
    $replacement 'v/';
            
    $vlink preg_replace($pattern$replacement$vlink); 
            
    $pattern '/&feature=youtube_gdata/si';
            
    $replacement '?version=3&feature=player_embedded&controls=0&rel=0&showinfo=0';
            
    $vlink preg_replace($pattern$replacement$vlink);
            
    $count $count 1;
          }
          else
          {
            
    $v $ytObject->parseVideoRow($video);
            
    $v_link $v['videoLink'];
            
    $vimg $v['RKT_videoImage'];
            
    $vtitle $v['RKT_videoTitleFull'];
            
    preg_match('/(\?v=)(.*?)(&feature=)/si'$v_link$regs);
            
    $cvideoLink $regs[2];
                
    $count $count 1;
            
                
    $relatevideo .= '    <td align="center">
                                  <span style="cursor: pointer;" onclick="ori_make_request(' 
    "'/oriflame/oriflame_getvideolink.php?videoLink=" $cvideoLink "', 'videoarea'" ')">
                                      <img src="' 
    $vimg '"  title="' $vtitle '" width="65px" />
                                  </span>        
                              </td>'
    ;
          }
          }
              
          
    $relatevideo .= '    </tr></table>';
         }
      else
      {
        
    $vlink 'http://www.youtube.com/v/34_fAKEMZTE?version=3&feature=player_embedded&controls=0&rel=0&showinfo=0';
        }
    }
    else
    {
      
    $vlink 'http://www.youtube.com/v/34_fAKEMZTE?version=3&feature=player_embedded&controls=0&rel=0&showinfo=0';
    }

    eval(
    '$home[$mods[\'modid\']][\'content\'] .= "' fetch_template('adv_portal_first_page') . '";');

    ?>
    В позиции Использованные шаблоны вставляем название нашего шаблона.
  3. Вставляем модуль на страницу

Понятно, что и дизайн и содержание может быть любым, но в общем и целом думаю идея понятна.
 
 
dr Vatson
Почти новичок
Default
0

Проверим сейчас)

dr Vatson добавил 24.04.2012 в 20:30
Не получается что то сложно для меня)

Last edited by dr Vatson : 04-24-2012 at 08:30 PM. Reason: Добавлено сообщение
 
 
Sven
Front-End Developer
 
Sven's Avatar
Default
0

dr Vatson, в вба, в настройках (не помню где, нет под рукой форума с вба) есть меню настройки блоков, можно настроить, что типа
left_block | left_center | right_center | right_block
Потом в шаблоне adv_portal редактируем переменные (вписываешь те, что указал в настройках), затем в настройках страницы будет несколько блоков (сколько указал в настройках) для вставки информации (Новости, форма логина, календарь и пр.)
 
 
dr Vatson
Почти новичок
Default
0

Первое прописал а вот с этим трудно... зашел в шаблон и что дальше не понимаю
Quote:
Originally Posted by Sven View Post
Потом в шаблоне adv_portal редактируем переменные (вписываешь те, что указал в настройках), затем в настройках страницы будет несколько блоков (сколько указал в настройках) для вставки информации (Новости, форма логина, календарь и пр.)
Вот шаблон adv_portal что тут менять ?

Code:
$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]" xmlns="http://www.w3.org/1999/xhtml">
<head>
<if condition="$pages['name'] == 'home'">
	<meta http-equiv="Cache-Control" content="no-cache" />
	<meta http-equiv="Pragma" content="no-cache" />
	<meta http-equiv="Expires" content="0" />
</if>

<title>$vboptions[hometitle] <if condition="$pagetitle">- $pagetitle</if></title>

$headinclude

</head>
<body>

$header

$navbar

<if condition="$show['customizepagelink']">
	<div align="$stylevar[right]" style="padding-top: $stylevar[cellpadding]px; padding-bottom: $stylevar[cellpadding]px">
		<if condition="$show['customizepage']">
			[<a href="javascript: reset_cmps_layout($pages[pageid])">$vbphrase[reset_layout]</a>]
			[<a href="$show[customizepagelink]">$vbphrase[exit_customization_mode]</a>]
		<else />
			[<a href="$show[customizepagelink]">$vbphrase[customize_this_page]</a>]
		</if>
	</div>
</if>

<table align="center" class="page" cellspacing="0" cellpadding="0" width="100%">
	<tr valign="top">
		<if condition="$show['left_column']">
			<td width="$vba_style[portal_leftcolwidth]"<if condition="$show['center_column'] OR $show['right_column']"> style="padding-$stylevar[right]: $vba_style[portal_colspacing]px"</if>>
				$home[leftblocks]
			</td>
		</if>
		<if condition="$show['center_column']">
			<td valign="top">
				$home[centerblocks]
			</td>
		</if>
		<if condition="$show['right_column']">
			<td valign="top" width="$vba_style[portal_rightcolwidth]"<if condition="$show['center_column'] OR $show['left_column']"> style="padding-$stylevar[left]: $vba_style[portal_colspacing]px"</if>>
				$home[rightblocks]
			</td>
		</if>
	</tr>
</table>

$footer

</body>
</html>

Last edited by dr Vatson : 04-24-2012 at 09:10 PM.
 
 
Sven
Front-End Developer
 
Sven's Avatar
Default
0

$home[rightblocks] - переменная вывода блоков, right - это то, что ты прописал в настройках
суть ясна?
 
 
dr Vatson
Почти новичок
Default
0

что то не получается........ вроде переменные прописал и ничего не меняется
 
 
Sven
Front-End Developer
 
Sven's Avatar
Default
0

Стукни мне в асю.
 
 
dr Vatson
Почти новичок
Default
0

Не получается...((( Не понимаю что не так делаю.... Может кто по пунктам разложит что и как??
 
 
Sven
Front-End Developer
 
Sven's Avatar
Default
1

Да как еще по пунктам? Видео что ли снимать?

Сейчас поставлю вба - сделаю скрины.

Sven добавил 25.04.2012 в 10:22
http://savepic.net/2782541.png

На странице даже пример написан (Это еще вчера в асе написал)
Пример: Если вы желаете добавить местоположение "низ", то вы можете ввести в качестве имени переменной 'bottom' и в качестве названия 'Нижняя колонка'.
После этого вам следует добавить переменную '$home[bottomblocks]' в нужное место шаблона 'adv_portal'.

А дальше уже верстка обычная

Last edited by Sven : 04-25-2012 at 10:23 AM. Reason: Добавлено сообщение
 


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 03:26 PM.


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