Page 11 of 23
Posted: Sat 15. Apr 2006, 22:14
by b.it
larmann wrote:Hi b.it
I didn't get your second "display-thingie" code blog. Where should I integrate your code? In the index.php in the root? And why is it twice? And where should I ad the last code blog in the index.php?
Hi, I tried to clear thing up. yes, i'm referring to cmsroot/index.php. user-display-thingie means that little red display saying "admin: username" when a user is logged in.
This hack is more a temporary workaround, cause acording to this code-piece
Code: Select all
// 0 = frontend (all) mode
// 1 = article user mode
// 2 = admin user mode
some things are not quite working the way they where intended to
BTW: There is an other strange thing going on: Ones in a while when I commit changes in the backend (as admin) and I hit "save" then the system switches to frontend. It doesn't log me out anyway - if I hit the browsers back button I am in the backend again. If this happens then the frontend site that is shown is: /index.php?internes although usually it should actually be /internes.phtml
has not occured to me ... (by now) - but I haven't activated caching (yet)
Sorry for asking so much. But adtually, I don't understand to much of the code.
I'm not sure at all, how much I actually understand of the code. we'll see later...
Posted: Sun 16. Apr 2006, 13:02
by volkman
@phalancs
The Mod is great, not doubt about. I love it and will use it.
The only (phpwcms) problem I am seeing is the abilty for FE-users to alter public/nonpublic for articles, hmm. Plus they can call the installed modules whats no fun (just found out).
Hope someone comes up with a solution, would make me feel way more safe.
I have seen b.it's solution here, but I love the ability to give registered users the option of a "closed" message and chat-system.
keep on going and happy easter days
volkman
Posted: Sun 16. Apr 2006, 15:14
by volkman
@phalances
I have been playing around with phpwcms.php a bit concerning the problem that access to installed modules is open for FE-only users if the are in backend and URL-type "phpwcms.php?do=modules". They were able to access all modules and alter them. I added two lines (red) to the case modules section. After that they can "see" the installed modules but not open them and alter.
case "modules": //Modules
if($_SESSION["wcs_user_admin"] == 1) {
switch ($p) {
case 2: // Graphical Text MOD
if($phpwcms["gt_mod"]) { //enabled/disable GT MOD
include_once("include/inc_module/mod_graphical_text/main.inc.php");
}
break;
case 3: // Caledar Mod
if ($phpwcms["calendar_mod"]) { //enabled/disable calendar mod
include_once("./include/inc_module/mod_calendar/main.inc.php");
}
break;
case 7: // DownloadCounter MOD
if($phpwcms['dc_mod']) {
include_once('./include/inc_module/mod_downloadcounter/main.inc.php');
}
break;
default: echo 'Thanks to Jérôme for his <a href="phpwcms.php?do=modules&p=2">Graphical Text MOD</a>.';
echo '<br> <br>Other modules might follow. GT MOD will be moved to admin section.';
}
}
break;
I did not find any backdrops so far, access for admins is still working.
volkman
Posted: Sun 16. Apr 2006, 15:19
by volkman
@phalances
same works for the articles. i have included the two lines in phpwcms.php and from now FE-users can't do anything with the articles when they hit phpwcms.php?do=articles in the backend.
case "articles": //Artikelbearbeitung
if($_SESSION["wcs_user_admin"] == 1) {
$_SESSION['image_browser_article'] = 0; //set how image file browser should work
switch ($p) {
case 0: include_once ("include/inc_tmpl/article.structlist.tmpl.php"); break;
case 1: include_once ("include/inc_tmpl/article.new.tmpl.php"); break; //Neuen Artikel anlegen
case 2: include_once ("include/inc_lib/article.editcontent.inc.php"); break; //Contentedit
}
}
break;
Works perfect for me, hope there is no backdrop.
volkman
yes
Posted: Tue 18. Apr 2006, 04:34
by phalancs
@volkman: Yes this is a good solution for that. Thought about sth. similar. Will add this to the install.txt. No backdrop on this one. All lamps on green. This is the common way to check for user status.
@b.it: What exactly is the "display thingy" about? Did not yet try, may be you could give a brief intro or sth.
BTW: Thanx for helping me here with the support
much appreciated!
@larmann: Hmm, the "switching to frontend behaviour", not sure probably this really is a caching issue. But independently from using the userpanel, i think i have already experienced something similar.. Not quite sure.
Posted: Tue 18. Apr 2006, 22:38
by dual
hallo! Coole erweiterung! Gefällt mir!
Ich habe aber ein Problem: Wenn ich versuche mich einzuloggen, dann werde ich immer wieder auf die login seite zurürck geworfen. Egal ob als frontet user oder als Admin. Warum?
Posted: Wed 19. Apr 2006, 10:40
by ff123
dual wrote:hallo! Coole erweiterung! Gefällt mir!
Ich habe aber ein Problem: Wenn ich versuche mich einzuloggen, dann werde ich immer wieder auf die login seite zurürck geworfen. Egal ob als frontet user oder als Admin. Warum?
You should replace some code in phpwcms.php:
replace this:
case "logout": //Logout
mysql_query("UPDATE ".DB_PREPEND."phpwcms_userlog SET logged_change=".time().", logged_in=0 WHERE logged_user='".$_SESSION["wcs_user"]."' AND logged_in=1;");
session_destroy();
header("Location: ".PHPWCMS_URL."login.php");
exit();
break;
with that:
//ENYM.com login-logout-panel: changed logout target
case "logout": //Logout
mysql_query("UPDATE ".DB_PREPEND."phpwcms_userlog SET logged_change=".time().", logged_in=0 WHERE logged_user='".$_SESSION["wcs_user"]."' AND logged_in=1;");
session_destroy();
header("Location: ".PHPWCMS_URL."index.php"); //Target Site you want to be shown after logout
exit();
break;
//ENYM.com login-logout-panel: changed logout target
See also the installation instructions.
Now you can redirect to any page you want after logout by editing this line of code:
header("Location: ".PHPWCMS_URL."index.php"); //Target Site you want to be shown after logout
Note that you are always redirected to the frontpage now, whether you logout of the admin section or the front section!
Posted: Thu 20. Apr 2006, 11:39
by dual
Hi! Thanks for your answer!
Even if I change the sourcecode in the phpwcms, the login panel doesn't work. It puts me everytime back to the login screen.
When I'am login as admin, and I want to look at the login screen it tells me that:
Code: Select all
Warning: main(): Unable to access ./include/inc_ext/phpOpenTracker/phpOpenTracker.php in /home/httpd/vhosts/xxxxxxxxxx.net/httpdocs/united/include/inc_front/content/cnt203.article.inc.php on line 563
Warning: main(./include/inc_ext/phpOpenTracker/phpOpenTracker.php): failed to open stream: No such file or directory in /home/httpd/vhosts/xxxxxxx.net/httpdocs/united/include/inc_front/content/cnt203.article.inc.php on line 563
Warning: main(): Failed opening './include/inc_ext/phpOpenTracker/phpOpenTracker.php' for inclusion (include_path='.:') in /home/httpd/vhosts/xxxxxxx.net/httpdocs/united/include/inc_front/content/cnt203.article.inc.php on line 563
Fatal error: Undefined class name 'phpopentracker_config' in /home/httpd/vhosts/xxxxxxx.net/httpdocs/united/include/inc_front/content/cnt203.article.inc.php on line 564
Posted: Thu 20. Apr 2006, 12:28
by volkman
we have had this twice in this thread, take a look
http://www.phpwcms.net/forum/viewtopic. ... c&start=90
and here
http://www.phpwcms.net/forum/viewtopic. ... &start=120
and on the startpage of this thread:
Siehe Anfangssseite:
VTS link (req. VTS) [activate only if you have vts installed!]
volkman
Posted: Thu 20. Apr 2006, 15:16
by jamo
Wo liegt der Unterschied zwischen der Download Version 2.0 und 2.01 des Userpanels? ich habe 2.01 runtergeladen, bis auf den Passwort-Reset
funktioniert das Panel auch.
Wenn ich auf "Passwort vergessen?" klicke und die Daten eines Test FE Users
eingebe, erhalte ich nur immer wieder die Meldung " Daten prüfen",obwohl Benutzername und E-Mail definitiv korrekt sind. Auch mit einem neu angelegten FE/BE User geht es nicht,warum nicht ?? Ich bin nicht als Admin angemeldet! Ich komme hier einfach nicht weiter und weiß auch nicht woran es liegt oder hätte ich die Version 2.0 nehmen müssen? phalancs help me, please! Ich habe für die die Passwort-Reset-Box alles nötig eingegeben und angehakt.
Where`s the difference between the download userpanel version 2.0 and 2.01 ?
The panel works but only the passwort-recovery doesn`t work like I want....I feed the data ( username and e-mail) of a new invested FE user ,and when I push the go\send button I only get the notice " Daten prüfen\check data". The FE user data are definitely regular and I`m not log as admin.
I`dont understand this. Where`s the fault....what make I wrong ? I use download version 2.01 . Thanks for helping me.
hmm
Posted: Thu 20. Apr 2006, 17:53
by phalancs
Unterschied zwischen 2.0 und 2.01: zwei kleine Fehler bzgl. der Datenbankverbindung korrigiert, neue Sprache und irgendwas an ner Tabelle berichtigt.
@jamo: Zu Deinem Problem: Hast Du das ganz eirgendwo online? Dann könnt eich da mal reinsehen.
Re: hmm
Posted: Thu 20. Apr 2006, 19:49
by jamo
phalancs wrote:Unterschied zwischen 2.0 und 2.01: zwei kleine Fehler bzgl. der Datenbankverbindung korrigiert, neue Sprache und irgendwas an ner Tabelle berichtigt.
@jamo: Zu Deinem Problem: Hast Du das ganz eirgendwo online? Dann könnt eich da mal reinsehen.
Hallo phalancs,
reicht dir der link oder was brauchst du ?
Danke, für deine Hilfe!
Posted: Sun 23. Apr 2006, 19:44
by ff123
I have installed the userpanel and it's superb, bravo!
There are only a few things I cant get worked out:
- when I create an new frontend user, his language is automatically set to german, so he gets a german confirmation mail etc. I changed the language in "conf.inc.php" into "NL". So dutch should be the default language now
* Update: I have noticed that at first the login form is shown in the language which is configurated in the browser. But when login fails, the login form automatically jumps to the german language.
How can I configure the userpanel so that everything is always shown in dutch, even if the browser is set to another language?
- I use {show_content} to show the userpanel in the left, but I want the password reset form (and also the registration form) to be shown in the middle where reptag {content} is.
- When I click on "register" in the frontpage, the left menu disappears as well as the search box and the login form is shown instead of a registration form, very strange
Ich hoffe dieser Posting ist auch klar fuer die deutschsprachigen, am sonsten ubersetze ich das noch mal!
Regards, groeten,
vuurvos
Posted: Tue 25. Apr 2006, 02:11
by phalancs
@ff1423:
when I create an new frontend user, his language is automatically set to german, so he gets a german confirmation mail etc. I changed the language in "conf.inc.php" into "NL". So dutch should be the default language now
Hmm, this does not have anything do with the userpanel..
to show the userpanel in the left, but I want the password reset form in the middle
Well, PW reset and login are included in one CP. Not seperation is possible unless you create two dirfferent CPs.
When I click on "register" in the frontpage, the left menu disappears as well as the search box and the login form is shown instead of a registration form, very strange
You need to assign a target for the registering thing. You shoud create some registering content. Otherwise there will be no "registration form".
Posted: Tue 25. Apr 2006, 12:47
by ff123
when I create an new frontend user, his language is automatically set to german, so he gets a german confirmation mail etc. I changed the language in "conf.inc.php" into "NL". So dutch should be the default language now
Hmm, this does not have anything do with the userpanel..
I hardcoded in cnt203.article.inc.php that always language NL should be used. It's not a neat solution, but it works.
When I click on "register" in the frontpage, the left menu disappears as well as the search box and the login form is shown instead of a registration form, very strange
You need to assign a target for the registering thing. You shoud create some registering content. Otherwise there will be no "registration form".
How should this "registering content" look like, some e-mail form?
Are there certain rules for this "registering content"?