Меню
Назад » » »

Создаём фотохостинг на юкоз

С помощью этого кода делаем фотохостинг из своего сайта на Юкоз.
 
Получим после загрузки изображения на сайт:
  • ссылку на фото;
  • возможность открыть фото в отдельном окне;
  • BB код изображения для встаки на форум.
Код вставляем в страницу добавления фотографии, перед  </body>.
 
 
 
<body style="background-color:#FFFFFF; margin:0;padding:0;" onload="document.getElementById('uphoto1').focus();">
<script type="text/javascript">$(document).ready(function(){ $("#phM2,#suggEdit1,#tp11,#tp21,#newPhtBtDiv, #mdM31,#mdM32,#puM26,hr,#phF5,fieldset .manTd1:eq(1),#phM5 div:eq(1)").hide(); $("#cus1").attr("checked","checked"); $("#phM23").attr("align",""); $("fieldset").before("<br><br>"); $("#phF5").attr("disabled","disabled"); $("#phF4").css("padding","7px 15px 7px 15px").attr("value","Загрузить"); });</script>
<script type="text/javascript">
if(location.search=='?upload'){
$(document).ready(function(){
$("legend,#phM6,#ph31").hide();
$("#phM30 #phM31").hide();
$("fieldset").css("border","0px");
});
}
</script> 

<script type="text/javascript">
function getimg(){
//* Копирайт © http://sharasoft.at.ua/
imgurl=$('.myWinCont a').html();
if(imgurl!=undefined){
new _uWnd('imgscodes','Изображение успешно загружено',380,210,{autosize:1,maxh:300,minh:110},'<fieldset><legend><b>Скопируйте нужный код:</b></legend><b>Ссылка</b>: <input type="text" value="$HOME_PAGE_LINK$_ph/1/2/'+imgurl+'" onclick="select(this)" style="width:200px;"><br><b>ББ-код</b>: <input type="text" value="[img]$HOME_PAGE_LINK$_ph/1/2/'+imgurl+'[/img]" id="sel" style="width:200px;" onclick="select(this)" style="width: 150;"><br><b>HTML</b>: <input style="width:200px;" type="text" value="<img src="$HOME_PAGE_LINK$_ph/1/2/'+imgurl+'" border="0" alt="Sharasoft.at.ua">" onclick="select(this)" style="width: 150;"></fieldset><hr><br><a href="$HOME_PAGE_LINK$_ph/1/2/'+imgurl+'" target="_blank">Открыть эту картинку в новом окне</a><br><br><a href="$HOME_PAGE_LINK$photo/0-0-0-1">Залить еще</a>');
_uWnd.close('addPht');
clearInterval(int);}}
int=setInterval(function(){getimg()},100);
</script>
Никто не решился оставить свой комментарий.
Будь-те первым, поделитесь мнением с остальными.
m">
avatar