Warunek if iMEMBER nie działa na dodatkowej stronie (brak strony)
|
Maserman |
Dodany dnia 20.06.2009 11:02:38
|
Przedszkolak
Postów: 81 Ostrzeżeń: 4
Data rejestracji: 20.10.2007 13:25
|
Witam, ostatnio przeszukałem forum i znalazłem sposób na zrobienie strony widocznej tylko dla zarejestrowanych:
<?php
if (iMEMBER) {
echo "Treść strony";
} else {
echo "Nie możesz oglądać tej strony";
}
?>
Mam stronkę gildyjną. Mam na niej tzw. application template, którzy nowi, zarejestrowani użytkownicy kompiują i postują wypełniony na forum. Chciałbym, żeby moja podstrona z tym template właśnie była widoczna tylko dla zalogowanych użytkowników. Wygląda to tak:
<?php
if (iMEMBER) {
echo "Read the template carefully, then copy it, go to the recruitment forums using the link given below, paste and fill out.
<br>
<strong>A. Basic Information</strong>
<br>
<br>
1. Name:<br>
2. Age:<br>
3. Gender:<br>
4. Location:<br>
5. Occupation:<br>
6. Tell us a little bit about yourself:<br>
7. How long have you played WoW?<br>
8. Total time played on this character:
<br>
<br>
<strong>B. System Information</strong><br>
<br>
1. System specs:<br>
2. Do you have a microphone? Can you use ventrilo?<br>
3. Do you have any disconnection problem at all?<br>
4. Average FPS in raid during a boss?:<br>
5. Average latency while raiding?<br>
<br>
<br>
<strong>C. Raiding and Character information</strong>
<br><br>
1. Character Name | Class | Spec:<br>
2. Armory link: <br>
3. Are you exalted with Sons of Hodir?<br>
4. What is your raiding experience Pre-BC? In BC? WoTLK? Specify if in a leadership role.<br>
5. You will need lots of consumables to keep up with the pace during progression raids. Do you have the will and time to put in enough effort to keep an adequate amount?<br>
6. Will you come to a progression raid having already read any available information relevant to encounters?<br>
7. What do you think about beginning raids early and staying beyond the required raid times to down new content?<br>
8. Post a WWS report / Wow Meter Online of a few recent raids in your guild. If your guild does not run these, post a screenshot(s) of your recount for some boss encounters.<br>
9. Post a screenshot of your UI while in a raid enviroment (in combat). Give a list of any relevant addons not shown.<br>
<br>
<br>
<strong>D. Other Questions</strong>
<br>
<br>
1. What guild are you currently in? Who is/was the GM?<br>
2. Why are you leaving your current guild?<br>
3. Do you play actively outside of raiding?<br>
4. Are you able to take and improve upon harsh criticism?<br>
5. There will be Bench time. Everyone will have to sit at one point in time or another. Are you okay with this?<br>
6. Why are you interested in joining Duality? do you currently know anyone in Duality?<br>
7. If your application is accepted. What kind of raider can we expect you to be? Give a brief description of your attitude towards raiding in both progression and farm content. Does your level of play decline during the farm period?<br>
<br>
<br>
<br>
So what now? It's time to post an application!
<br>
<a href="/forum/post.php?action=newthread&forum_id=2"onMouseOver="overlib('<center>Remember to copy this application and post it fully filled on the recruitment forum!</center>', FGCOLOR, 'dodgerblue', BGCOLOR, 'black', TEXTCOLOR, 'black', STATUS, 'Dymek zwykły')" onMouseOut="nd();" ><b><u>Take me to the recruitment forum!</u></b></a>";
} else {
echo "You cannot watch this content untill you are logged in.";
}
?>
Po sprawdzeniu strona w ogóle się nie wyświetla. Sprawdziłem, okazało się że jak usunąłem cały ten link to dopiero strona była widoczna.
Czy coś w tym jest źle?
Dzięki za pomoc i pozdrawiam.
EDIT: Stronka: www.duality-guild...
PW od moderatora:
- Przeniesienie tematu - Pieka 20.06 - 12:17
- Zmiana nazwy tematu - Pieka 20.06 - 12:17
Edytowane przez Pieka dnia 21.06.2009 15:24:26
|
|
|
|
Wścibski Gość |
Dodany dnia 22.12.2024 08:19:48
|
Pan Kontekstualny
Postów: n^x
Data rejestracji: Zawsze
|
|
IP: localhost |
|
|
kefirek |
Dodany dnia 20.06.2009 11:19:32
|
Zaawansowany
Postów: 1191 Pomógł: 418 Ostrzeżeń: 1
v6.00.xxx Data rejestracji: 06.04.2008 21:59
|
A jak dasz tak ?
<?php
require_once "maincore.php";
require_once THEMES."templates/header.php";
opentable('');
if (iMEMBER) {
echo "Read the template carefully, then copy it, go to the recruitment forums using the link given below, paste and fill out.
<br>
<strong>A. Basic Information</strong>
<br>
<br>
1. Name:<br>
2. Age:<br>
3. Gender:<br>
4. Location:<br>
5. Occupation:<br>
6. Tell us a little bit about yourself:<br>
7. How long have you played WoW?<br>
8. Total time played on this character:
<br>
<br>
<strong>B. System Information</strong><br>
<br>
1. System specs:<br>
2. Do you have a microphone? Can you use ventrilo?<br>
3. Do you have any disconnection problem at all?<br>
4. Average FPS in raid during a boss?:<br>
5. Average latency while raiding?<br>
<br>
<br>
<strong>C. Raiding and Character information</strong>
<br><br>
1. Character Name | Class | Spec:<br>
2. Armory link: <br>
3. Are you exalted with Sons of Hodir?<br>
4. What is your raiding experience Pre-BC? In BC? WoTLK? Specify if in a leadership role.<br>
5. You will need lots of consumables to keep up with the pace during progression raids. Do you have the will and time to put in enough effort to keep an adequate amount?<br>
6. Will you come to a progression raid having already read any available information relevant to encounters?<br>
7. What do you think about beginning raids early and staying beyond the required raid times to down new content?<br>
8. Post a WWS report / Wow Meter Online of a few recent raids in your guild. If your guild does not run these, post a screenshot(s) of your recount for some boss encounters.<br>
9. Post a screenshot of your UI while in a raid enviroment (in combat). Give a list of any relevant addons not shown.<br>
<br>
<br>
<strong>D. Other Questions</strong>
<br>
<br>
1. What guild are you currently in? Who is/was the GM?<br>
2. Why are you leaving your current guild?<br>
3. Do you play actively outside of raiding?<br>
4. Are you able to take and improve upon harsh criticism?<br>
5. There will be Bench time. Everyone will have to sit at one point in time or another. Are you okay with this?<br>
6. Why are you interested in joining Duality? do you currently know anyone in Duality?<br>
7. If your application is accepted. What kind of raider can we expect you to be? Give a brief description of your attitude towards raiding in both progression and farm content. Does your level of play decline during the farm period?<br>
<br>
<br>
<br>
So what now? It's time to post an application!
<br>
<a href="/forum/post.php?action=newthread&forum_id=2"onMouseOver="overlib('<center>Remember to copy this application and post it fully filled on the recruitment forum!</center>', FGCOLOR, 'dodgerblue', BGCOLOR, 'black', TEXTCOLOR, 'black', STATUS, 'Dymek zwykły')" onMouseOut="nd();" ><b><u>Take me to the recruitment forum!</u></b></a>";
} else {
echo "You cannot watch this content untill you are logged in.";
}
closetable();
require_once THEMES."templates/footer.php";
?>
|
|
|
|
Maserman |
Dodany dnia 20.06.2009 11:36:28
|
Przedszkolak
Postów: 81 Ostrzeżeń: 4
Data rejestracji: 20.10.2007 13:25
|
Dzięki za szybką odpowiedź. Niestety, jest to samo, pusta strona. |
|
|
|
Pieka |
Dodany dnia 20.06.2009 12:17:17
|
Postów: 19885 Pomógł: 767
v7.02.03 Data rejestracji: 23.02.2005 18:12
|
Mozesz mi wytlumaczyc dlaczego temat dotyczacy v7 wstawiasz do dzialu webmasteringu? Czego nie rozumiesz w opisie? Moze Ci to trzeba namalowac kolorowymi kredkami i wstawic komentarze? Poza tym, temat opisany na forum, wystarczylo wykazac sie jedynie odrobina zaangazowania: http://www.php-fu...d_id=20700
Edytowane przez Pieka dnia 20.06.2009 12:23:48
Jestem jaki jestem
|
|
|
|
slawekneo |
Dodany dnia 20.06.2009 12:33:47
|
Bywalec
Postów: 915 Pomógł: 41
Data rejestracji: 12.03.2006 07:28
|
Ten kodzik wklejasz w tresc strony dodatkowej czyli u Ciebie bedzie to "custom pages" (bo masz ustawiony jezyk strony angielski)
Glownym bledem byly niestety jak zawsze problemy z znakami ' i ". A to są PODSTAWY!
Dodalem tez w linku odczyt stalej FORUM, która pozwala na poprawne ustawienie sciezki do forum.
<?php
if (iMEMBER) {
echo "Read the template carefully, then copy it, go to the recruitment forums using the link given below, paste and fill out.
<br>
<strong>A. Basic Information</strong>
<br>
<br>
1. Name:<br>
2. Age:<br>
3. Gender:<br>
4. Location:<br>
5. Occupation:<br>
6. Tell us a little bit about yourself:<br>
7. How long have you played WoW?<br>
8. Total time played on this character:
<br>
<br>
<strong>B. System Information</strong><br>
<br>
1. System specs:<br>
2. Do you have a microphone? Can you use ventrilo?<br>
3. Do you have any disconnection problem at all?<br>
4. Average FPS in raid during a boss?:<br>
5. Average latency while raiding?<br>
<br>
<br>
<strong>C. Raiding and Character information</strong>
<br><br>
1. Character Name | Class | Spec:<br>
2. Armory link: <br>
3. Are you exalted with Sons of Hodir?<br>
4. What is your raiding experience Pre-BC? In BC? WoTLK? Specify if in a leadership role.<br>
5. You will need lots of consumables to keep up with the pace during progression raids. Do you have the will and time to put in enough effort to keep an adequate amount?<br>
6. Will you come to a progression raid having already read any available information relevant to encounters?<br>
7. What do you think about beginning raids early and staying beyond the required raid times to down new content?<br>
8. Post a WWS report / Wow Meter Online of a few recent raids in your guild. If your guild does not run these, post a screenshot(s) of your recount for some boss encounters.<br>
9. Post a screenshot of your UI while in a raid enviroment (in combat). Give a list of any relevant addons not shown.<br>
<br>
<br>
<strong>D. Other Questions</strong>
<br>
<br>
1. What guild are you currently in? Who is/was the GM?<br>
2. Why are you leaving your current guild?<br>
3. Do you play actively outside of raiding?<br>
4. Are you able to take and improve upon harsh criticism?<br>
5. There will be Bench time. Everyone will have to sit at one point in time or another. Are you okay with this?<br>
6. Why are you interested in joining Duality? do you currently know anyone in Duality?<br>
7. If your application is accepted. What kind of raider can we expect you to be? Give a brief description of your attitude towards raiding in both progression and farm content. Does your level of play decline during the farm period?<br>
<br>
<br>
<br>
So what now? It's time to post an application!
<br>
<a href='".FORUM."post.php?action=newthread&forum_id=2'onMouseOver=\"overlib('<center>Remember to copy this application and post it fully filled on the recruitment forum!</center>', FGCOLOR, 'dodgerblue', BGCOLOR, 'black', TEXTCOLOR, 'black', STATUS, 'Dymek zwykły')\" onMouseOut='nd();' ><b><u>Take me to the recruitment forum!</u></b></a>";
} else {
echo "You cannot watch this content untill you are logged in.";
}
?>
Kliknij i zaczekaj na załadowanie kodu ...
Teraz cos odemnie :D
Jesli robisz wiecej podstron dla zalogowanych to polecam ci zrobic jedna podstrone z informacja typu "You cannot watch this content untill you are logged in." i dodajesz link do logowana lub odrazu wstawiasz formularz dologowania, a w podstronach na samym poczatku kodu dodajesz proste przekierowane korzystajac z funkcji redirect czyli //w page_id= podajesz id podstrony w ktorej podales info dla niezalogowanych u mnie w przykladzie jest to id=1
if(!iMEMBER) { redirect(BASEDIR."viewpage.php?page_id=1"); }
Kliknij i zaczekaj na załadowanie kodu ...
Taki maly zabieg duzo ulatwia :D
Pozdro!!
Edytowane przez Pieka dnia 21.06.2009 15:26:39
|
|
|
|
Maserman |
Dodany dnia 20.06.2009 15:51:48
|
Przedszkolak
Postów: 81 Ostrzeżeń: 4
Data rejestracji: 20.10.2007 13:25
|
Dzięki za inicjatywę i pomoc.
Oczywiście miałem na myśli podstronę w php fusion a nie dodatkową, oddzielną podstronę.
@Pieka - wybacz, ale nie każdy wie tyle o PHP-Fusion i samym PHP co Ty. Myślałem że ten warunek dotyczy ogólnie php, więc dałem w webmasteringu. Rozumiem, że takich "niemyślących" tu nasz na pęczki, ale to nie znaczy że od razu trzeba takie rzeczy pisać. Niektóre tytuły i opisy działów są czasami różnie intepretowane (widząc prawie każdy post przeniesiony do "odpowiedniego działu.
@slawekneo - dzięki za to, jednak treść widoczną dla "public" i members reguluję poprzez linki na stronie głównej. Ale myślę że wypróbuję. Dzięki! |
|
|
|
Pieka |
Dodany dnia 20.06.2009 17:55:45
|
Postów: 19885 Pomógł: 767
v7.02.03 Data rejestracji: 23.02.2005 18:12
|
Zmiana nazwy tematu rowniez jest dla Ciebie pojeciem niezrozumialym?
Edit: W zwiazku z tym, ze jest tu kilka wartosciowych postow, tym razem nie usune tematu, ale kazdy Twoj nastepny zle nazwany i umieszczony zostanie natychmiast usuniety. Zapamietaj to sobie, zeby nie bylo pozniej zdziwien.
Edytowane przez Pieka dnia 21.06.2009 15:28:25
Jestem jaki jestem
|
|
|