| Autore |
Messaggio |
rgrech
 Amatore
46 Discussioni
|
07 febbraio 2005 alle 11:52:39 
Come posso creare pagine visibili solo ad alcune categorie di utenti registrati.
|
Zalabard
Moderatore
 Esperto
781 Discussioni
|
09 febbraio 2005 alle 12:17:45 
Crea delle "Categorie" di tipo "USERS" e poi usa la funzione
If IsAuthorizedCat("CATEGORIA") Then ' codice area riservata Else ' messaggio "non hai il ruolo richiesto" End If
Dove "CATEGORIA" è una di quelle create in precedenza
--------------- Frank Zalabard (sviluppo@aspnuke.it)
|
rgrech
 Amatore
46 Discussioni
|
09 febbraio 2005 alle 16:30:21 
grazie ora provo
|
rgrech
 Amatore
46 Discussioni
|
10 febbraio 2005 alle 12:22:20   Modificato il 10 febbraio 2005 alle 12:26:14
Non riesco a capire come e dove mettere lo scirpt
devo autorizzare la pagina solo agli utenti user
Ti allego tutta la pagina grazie per un tuo aiuto
<% ' ************************************************************************ ' * ASPNUKE: Free web portal in ASP * ' ************************************************************************ ' * ASP-Nuke 2.0 Copyright (c) 2004 by Aspnuke.it Staff * ' * (staff@aspnuke.it) http://www.aspnuke.it * ' * * ' * Re-design by Enrico Musante (c) 2004 (emu@libero.it) * ' * * ' * ASP-Nuke 1.0, 1.1, 1.2 Copyright (c) 2002-2003 by Gaetan Bouveret * ' * (webmaster@asp-nuke.com) http://www.asp-nuke.com * ' * * ' * This program is free software. You can redistribute it and/or modify * ' * it under the terms of the GNU General Public License as published by * ' * the Free Software Foundation; either version 2 of the License, or * ' * (at your option) any later version. * ' * * ' ************************************************************************ %> <% If IsAuthorizedCat("user") Then ' codice area riservata Else ' messaggio "non hai il ruolo richiesto" End If %>
<!-- #include file="includes/includes-inc.asp" -->
<% sTitlePage = GetTranslation("LANG_ARTICLES") %> <!-- #include file="includes/toppage1-inc.asp" --> <% %>
|
Zalabard
Moderatore
 Esperto
781 Discussioni
|
10 febbraio 2005 alle 12:32:08 
Ti faccio il mio esempio:
<% ' ************************************************************************ ' * ASP-Nuke: Free web portal in ASP * ' ************************************************************************ ' * Copyright (c) 2002-2003 by Gaetan Bouveret (webmaster@asp-nuke.com) * ' * http://www.asp-nuke.com * ' * * ' * This program is free software. You can redistribute it and/or modify * ' * it under the terms of the GNU General Public License as published by * ' * the Free Software Foundation; either version 2 of the License, or * ' * (at your option) any later version. * ' * * ' ************************************************************************ %> <!-- #include file='includes/includes-inc.asp' --> <!-- #include file='includes/GF-inc.asp' --> <!-- #include file='includes/news-inc.asp' --> <% sTitlePage = GetTranslation("LANG_TITLE_GF") sIcon = "GF_icon.ico" sInfoPage = "Area riservata" %> <!-- #include file='includes/toppage-inc.asp' --> <% If IsAuthorizedCat("GRUPPOFAM") Then DisplayGFReserved() Else DisplayGFnoaccess() End If %> <!-- #include file='includes/bottompage-inc.asp' --> <!-- #include file='includes/clearitall-inc.asp' -->
Naturalmente le funzioni DisplayGFReserved e DisplayGFnoaccess sono scritte nel file 'includes/GF-inc.asp' che è incluso all'inizio....
Ad esempio, le due funzioni sono:
Sub DisplayGFnoaccess() CreateTopTable "GFnoaccess",GetTranslation("LANG_GRUPPOFAM") & " - Accesso riservato" Response.Write("<br><h4>Quest'area è riservata ai componenti del Gruppo Famiglie</h4><p>") Response.Write("<div class=""normal"">Se non sei abilitato, ma vorresti esserlo,<br>") Response.Write("invia un <i>messaggio privato</i> (<u>dopo esserti registrato</u>) a ") Response.Write("<STRONG><A href=""" & GLOBAL_SITE_PATH & GLOBAL_SITE_PRIVATE_MESSAGES_PAGE & "?do=new&to=Checco"">Checco</A>.</STRONG></div>") CreateBottomTable "<a href=""" & GLOBAL_SITE_PATH & GLOBAL_SITE_GF_PAGE & "?cat=0"">Torna indietro</a>" End Sub
Sub DisplayGFReserved() CreateTopTable "GFnoaccess",GetTranslation("LANG_GRUPPOFAM") & " - Accesso riservato" GF_ReservedDisplay CreateBottomTable "<a href=""" & GLOBAL_SITE_PATH & GLOBAL_SITE_GF_PAGE & "?cat=0"">Torna indietro</a>" Response.Write "<a name=""GF_NEWS"">" DisplayTopNewsLinks GF_TOP_NEWS, GF_NEWS_ID DisplayTopNews GF_TOP_NEWS, GF_NEWS_ID DisplayTopArticlesGF GF_TOP_ARTICLES, GF_ARTICLES_ID, GF_ARTICLES_ID2 DisplayTopDirectoryGF GLOBAL_DIRECTORY_TOP, GF_LINKS_ID End Sub
... con un po' di personalizzazione, puoi ottenere ciò che vuoi
--------------- Frank Zalabard (sviluppo@aspnuke.it)
|
rgrech
 Amatore
46 Discussioni
|
10 febbraio 2005 alle 12:34:57 
Grazie mille riprovo
|
rgrech
 Amatore
46 Discussioni
|
10 febbraio 2005 alle 14:00:24 
Niente da fare sono propio handy .
Ho creato un file gf-inc.asp dove ho copiato tutto il listato che mi hai scitto
ho ricreato la pagina che dovrebbe essere riservata che qui sotto ti allego ma niente da fare.
<% ' ************************************************************************ ' * ASPNUKE: Free web portal in ASP * ' ************************************************************************ ' * ASP-Nuke 2.0 Copyright (c) 2004 by Aspnuke.it Staff * ' * (staff@aspnuke.it) http://www.aspnuke.it * ' * * ' * Re-design by Enrico Musante (c) 2004 (emu@libero.it) * ' * * ' * ASP-Nuke 1.0, 1.1, 1.2 Copyright (c) 2002-2003 by Gaetan Bouveret * ' * (webmaster@asp-nuke.com) http://www.asp-nuke.com * ' * * ' * This program is free software. You can redistribute it and/or modify * ' * it under the terms of the GNU General Public License as published by * ' * the Free Software Foundation; either version 2 of the License, or * ' * (at your option) any later version. * ' * * ' ************************************************************************ %> <!-- #include file="includes/includes-inc.asp" --> <!-- #include file="includes/gf-inc.asp" --> <% <% sTitlePage = GetTranslation("LANG_TITLE_GF") sIcon = "GF_icon.ico" sInfoPage = "Area riservata" %> <!-- #include file="includes/toppage1-inc.asp" --> <% If IsAuthorizedCat("user") Then DisplayGFReserved() Else DisplayGFnoaccess() End If %>
Garzie per la tua pazzienza
|
Zalabard
Moderatore
 Esperto
781 Discussioni
|
10 febbraio 2005 alle 14:10:24 
Ma che errore ti da? cosa vedi? hai definito una CATEGORIA "users" che si chiama "user"?!?!?!
Guardati anche il manuale http://www.aspnuke.it/manuale20/index.html?categorie.htm
--------------- Frank Zalabard (sviluppo@aspnuke.it)
|
rgrech
 Amatore
46 Discussioni
|
10 febbraio 2005 alle 14:22:42   Modificato il 10 febbraio 2005 alle 14:24:34
No non l'ho creata
Mi da impossibile visualizzare la pagine.
Intanto loggo il manuale grazie
|
rgrech
 Amatore
46 Discussioni
|
10 febbraio 2005 alle 15:12:16 
Qualcosa di nuovo è successo ma mi da questo messaggio per gli iscritti
LANG_GRUPPOFAM - Accesso riservato Errore di run-time di Microsoft VB Script error '800a01f4'
Variabile non definita: 'GF_ReservedDisplay'
/includes/gf-inc.asp, line 28
e questo per i non iscritti
LANG_GRUPPOFAM - Accesso riservato
Quest'area è riservata ai componenti del Gruppo Famiglie
Se non sei abilitato, ma vorresti esserlo, invia un messaggio privato (dopo esserti registrato) a Checco. Errore di run-time di Microsoft VB Script error '800a01f4'
Variabile non definita: 'GLOBAL_SITE_GF_PAGE'
/includes/gf-inc.asp, line 23
|
|
1
2
>>
|