← Desenvolvimento

Adicionar site aos favoritos

Lida 7569 vezes

Offline

BL4CKIC3 
Membro
Mensagens 3439 Gostos 0
Troféus totais: 32
Trófeus: (Ver todos)
Level 6 Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Poll Starter Level 5 Level 4 Level 3

Como se faz para por um link: adicionar este site aos favoritos ?
É um script ?
 :roll:
Não quero saber como se põe o link, mas sim o que esta por tras do link e que faz adicionar aos favoritos...Não sei se me estão a entender... :?
Offline

fpware 
Fundador
Mensagens 15318 Gostos 7
Troféus totais: 38
Trófeus: (Ver todos)
Linux User Mobile User Level 6 Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Poll Starter Level 5

Citação de: "BL4CKIC3"
Como se faz para por um link: adicionar este site aos favoritos ?
É um script ?
 :roll:
Não quero saber como se põe o link, mas sim o que esta por tras do link e que faz adicionar aos favoritos...Não sei se me estão a entender... :?


É um script

Código: [Seleccione]
<span style='cursor:hand;text-decoration:underline;'onclick='window.external.AddFavorite(location.href,document.title);'>
Click here to add this page to your favorites</span>


ou

Código: [Seleccione]
<SCRIPT LANGUAGE="Javascript"><!--

var url="http://www.fuzzywebmaster.com";
var title="FuzzyWebmaster.com";

function favorites(){
if(document.all)
window.external.AddFavorite(url,title)
}
//--></SCRIPT>
<a href="javascript:favorites()">Test it by clicking here!!</a>


Que chama a seguinte função do browser: window.external.AddFavorite que é uma função do Internet Explorer (creio que foi disponibilizada a partir da versão 4), por isso não funciona noutros browsers, como por exemplo, no Firefox.
Offline

Thor 
Membro
Mensagens 13 Gostos 0
Troféus totais: 21
Trófeus: (Ver todos)
Level 5 Super Combination Combination Topic Starter Level 4 Level 3 Level 2 Level 1 10 Posts First Post

Citação de: "fpware"


Que chama a seguinte função do browser: window.external.AddFavorite que é uma função do Internet Explorer (creio que foi disponibilizada a partir da versão 4), por isso não funciona noutros browsers, como por exemplo, no Firefox.


Não ha outro scrip que de para todos os browsers?


Cumps
Offline

Algemas 
Membro
Mensagens 1793 Gostos 0
Feedback +1

Troféus totais: 32
Trófeus: (Ver todos)
Level 6 Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Poll Starter Level 5 Level 4 Level 3

Offline

fpware 
Fundador
Mensagens 15318 Gostos 7
Troféus totais: 38
Trófeus: (Ver todos)
Linux User Mobile User Level 6 Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Poll Starter Level 5

Thor,

Creio que queres qualquer coisa deste tipo:

Código: [Seleccione]
<a href="http://Location/Of/Bookmark/Page" title="Bookmark Title" rel="sidebar" onclick="
if( window.sidebar && window.sidebar.addPanel ) {
    //Gecko (Netscape 6 etc.) - add to Sidebar
    window.sidebar.addPanel( this.title, this.href, '' );
} else if( window.external && ( navigator.platform == 'Win32' ||
      ( window.ScriptEngine && ScriptEngine().indexOf('InScript') + 1 ) ) ) {
    //IE Win32 or iCab - checking for AddFavorite produces errors for no
    //good reason, so I use a platform and browser detect.
    //adds the current page page as a favourite; if this is unwanted,
    //simply write the desired page in here instead of 'location.href'
    window.external.AddFavorite( location.href, document.title );
} else if( window.opera && window.print ) {
    //Opera 6+ - add as sidebar panel to Hotlist
    return true;
} else if( document.layers ) {
    //NS4 & Escape - tell them how to add a bookmark quickly (adds current page,
    //not target page)
    window.alert( 'Please click OK then press Ctrl+D to create a bookmark' );
} else {
    //other browsers - tell them to add a bookmark (adds current page, not target page)
    window.alert( 'Please use your browser\'s bookmarking facility to create a bookmark' );
}
return false;
">Add to Favorites, Bookmarks, Sidebar or Hotlist</a>
Offline

frsantos 
Membro
Mensagens 1458 Gostos 0
Troféus totais: 35
Trófeus: (Ver todos)
Linux User Mobile User Apple User Level 6 Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Poll Starter

não existe nenhuma forma instalar este sistema sem ter de entrar no codigo
n sei s me faxo entender
instalar este sistema como modulo ou componente
Offline

Algemas 
Membro
Mensagens 1793 Gostos 0
Feedback +1

Troféus totais: 32
Trófeus: (Ver todos)
Level 6 Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Poll Starter Level 5 Level 4 Level 3

Citação de: "x_santos"
não existe nenhuma forma instalar este sistema sem ter de entrar no codigo
n sei s me faxo entender
instalar este sistema como modulo ou componente

Existe. Deve haver ai algumas explicações sobre isso, mas isso é melhor com o fpware...

No Mambo e PHPNuke já existe por exemplo. É só instalar.

Mas queres para php?
Offline

fpware 
Fundador
Mensagens 15318 Gostos 7
Troféus totais: 38
Trófeus: (Ver todos)
Linux User Mobile User Level 6 Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Poll Starter Level 5

Algemas., tens toda a razão!

x_santos é para o mambo?
Offline

frsantos 
Membro
Mensagens 1458 Gostos 0
Troféus totais: 35
Trófeus: (Ver todos)
Linux User Mobile User Apple User Level 6 Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Poll Starter

dcpem so responder agora
e para mambo
:arrow: adicionar a favoritos
e  já agora se souberem
:arrow: tornar homepage
Offline

fpware 
Fundador
Mensagens 15318 Gostos 7
Troféus totais: 38
Trófeus: (Ver todos)
Linux User Mobile User Level 6 Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Poll Starter Level 5

Offline

frsantos 
Membro
Mensagens 1458 Gostos 0
Troféus totais: 35
Trófeus: (Ver todos)
Linux User Mobile User Apple User Level 6 Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Poll Starter

:obrigado:  :+trafego:
Já agora existe algum modulo para tornar a pagina como homepage
 :obrigado:  :orei:
Offline

fpware 
Fundador
Mensagens 15318 Gostos 7
Troféus totais: 38
Trófeus: (Ver todos)
Linux User Mobile User Level 6 Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Poll Starter Level 5

Eu andei à procura, mas ainda não encontrei ;)

Depois vejo isso com mais calma!
Offline

Ricardo75 
Membro
Mensagens 1660 Gostos 0
Troféus totais: 28
Trófeus: (Ver todos)
Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4 Level 3 Level 2 Level 1

O Bookmark us faz isso também, acho eu... quase de certeza... agora não em  lembro é só se funciona no IE, provavelmente só. Mas podes sempre mudar tu o código do módulo  :wink:
Offline

Curioso7 
Membro
Mensagens 155 Gostos 0
Troféus totais: 25
Trófeus: (Ver todos)
Super Combination Combination Topic Starter Poll Voter Level 5 Level 4 Level 3 Level 2 Level 1 100 Posts

Citação de: "fpware"

Código: [Seleccione]
<a href="http://Location/Of/Bookmark/Page" title="Bookmark Title" rel="sidebar" onclick="
if( window.sidebar && window.sidebar.addPanel ) {
    //Gecko (Netscape 6 etc.) - add to Sidebar
    window.sidebar.addPanel( this.title, this.href, '' );
} else if( window.external && ( navigator.platform == 'Win32' ||
      ( window.ScriptEngine && ScriptEngine().indexOf('InScript') + 1 ) ) ) {
    //IE Win32 or iCab - checking for AddFavorite produces errors for no
    //good reason, so I use a platform and browser detect.
    //adds the current page page as a favourite; if this is unwanted,
    //simply write the desired page in here instead of 'location.href'
    window.external.AddFavorite( location.href, document.title );
} else if( window.opera && window.print ) {
    //Opera 6+ - add as sidebar panel to Hotlist
    return true;
} else if( document.layers ) {
    //NS4 & Escape - tell them how to add a bookmark quickly (adds current page,
    //not target page)
    window.alert( 'Please click OK then press Ctrl+D to create a bookmark' );
} else {
    //other browsers - tell them to add a bookmark (adds current page, not target page)
    window.alert( 'Please use your browser\'s bookmarking facility to create a bookmark' );
}
return false;
">Add to Favorites, Bookmarks, Sidebar or Hotlist</a>


 Eu coloquei isto no código do site, mas cada vez que no Firefox tento adicionar a página abrem duas janelas para o adicionar. :cry:  
 Alguém sabe porque e consegue dar a volta a isto? Já agora parabéns pelo fórum!
Offline

Curioso7 
Membro
Mensagens 155 Gostos 0
Troféus totais: 25
Trófeus: (Ver todos)
Super Combination Combination Topic Starter Poll Voter Level 5 Level 4 Level 3 Level 2 Level 1 100 Posts

Então pessoal, ninguém sabe porquê?