форум vBSupport.ru > vBulletin > Old vB versions (3.0.x & 2.x.x) > vBulletin 3.6.x > vBulletin [3.6] Troubleshooting and Problems
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'а физически не в состоянии проверять все стили, хаки и нули, выкладываемые пользователями.
Помните: безопасность Вашего проекта - Ваша забота.
Убедительная просьба: при обнаружении уязвимостей или сомнительных кодов обязательно отписывайтесь в теме хака/стиля
Спасибо за понимание
 
 
 
 
zero135
Продвинутый
 
zero135's Avatar
Exclamation Как вывести рандомные фото в блок на vbadvanced?
0

Привет! Вот такая вот ситуация, хочу вывести рандомные фотографии из своей галереи, в какой-нить новый блок на главной.
Галерея у меня: PhotoPost vBGallery v2.4.3
Главная: vBadvanced CMPS версия 3.0.0
Версия воблы 3.7.2

Какими скриптами\модулями прописывается? Расскажите плз подробно!
Спасибо за внимание!

Last edited by zero135 : 08-19-2008 at 02:30 PM.
Bot
Yandex Bot Yandex Bot is online now
 
Join Date: 05.05.2005
Реклама на форуме А что у нас тут интересного? =)
 
 
Мик
Эксперт
 
Мик's Avatar
Default
0

а разве в мануале не прописан код скрипта вывода фоток???
 
 
zero135
Продвинутый
 
zero135's Avatar
Default
0

Мик, привет! Не нашёл, честно. Выложьте исходный код плз.
 
 
Мик
Эксперт
 
Мик's Avatar
Default
1

лучше постаь PhotoPlog Pro v.2.1.4.8
1. Она лучше!
2. там есть хороший мануал
 
 
zero135
Продвинутый
 
zero135's Avatar
Default
0

Quote:
Originally Posted by Мик View Post
лучше постаь PhotoPlog Pro v.2.1.4.8
1. Она лучше!
2. там есть хороший мануал
У меня фотопост стоит уже несколько лет, соответственно там уже база полна фоток, всё сносить не хотелось бы (( юзеры загрызут )))
 
 
maJic
В Черном списке
 
maJic's Avatar
Default
1

Quote:
<SCRIPT LANGUAGE="Javascript">
function tips() {
};
photo = new photo();
number = 0;
tips[number++] = "Путь к картинке"
tips[number++] = "Путь к картинке"
increment = Math.floor(Math.random() * number);
document.write(tips[increment]);
</SCRIPT>
Это правда не подходит, так-как приходится вручную, но будет не трудно переписать, что рандомно выводил картинки из папки на основании этого скрипта

maJic добавил 21.08.2008 в 12:30
Вот ещё 1 нашёл, правда на php
Quote:
<?
$imgdir=”img/”;
$ext=”jpg”;
$mode=2;
$error=”Мало картинок.”;
$errorfile=”error/error_001.jpg”;
$NoCacheMode=1;
function NoCache()
{
header(”Cache-Control: no-store, no-cache, must-revalidate”);
header(”Pragma: no-cache”);
header(”Last-Modified: “.gmdate(”D, d m y H:i:s”).”GMT”);
}
function FileCount($imgdir)
{
$files=0;
$cfile=opendir(”$imgdir”);
while(($e=readdir($cfile))!==false)
{
$files++;
}
$files-=3;
return $files;
}
function filetest($ranfile)
{global $imagelist;
$status = false;
if (IsSet($imagelist))
{
foreach ($imagelist as $occu)
{
$occu=trim($occu);
if ($ranfile==$occu)
{
$status=true;
return $status;
}
}
}
return $status;
}
function ImgWrite($ranfile)
{global $imagelist;
$ranfile=trim($ranfile);
$imagelist[]=$ranfile;
}
function ImgRandom($files)
{global $ext, $imgdir, $imgcounter, $mode, $error, $errorfile;
$ranfile= mt_rand(1, $files);
$ranfile= sprintf(”%03d”, $ranfile);
if (!filetest($ranfile))
{
ImgWrite($ranfile);
Echo “<img src=\”$imgdir$ranfile.”.$ext.”\”>”;
$imgcounter++;
}
else
{
if ($imgcounter<$files)
{
ImgRandom($files);
}
else
{
if ($mode==1)
{
Echo $error.”<br>”;
}
elseif ($mode==2)
{
Echo “<img src=\”$imgdir$errorfile.”.$ext.”\”>”;
}
}
}
}
if ($NoCacheMode==1)
{
NoCache();
}
$imgcounter=0;
print “<title>Случайный вывод картинок</title><br>”;
ImgRandom(FileCount($imgdir));
?>

Last edited by maJic : 08-21-2008 at 01:30 PM. Reason: Добавлено сообщение
 
 
INI
Продвинутый
 
INI's Avatar
Default
0

А покажите пример работающего предыдущего PHP кода на сайте с галереей.

И если можно подскажите что сделать с этим кодом чтобы вывести все же случайные фото га главную страницу портала. (vB 3.7.0 + vBa 3.0.1 + vBGallery v2.4.2)
 


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 01:23 AM.


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