Login Contentpart

Post custom hacks and enhancements for phpwcms here only. Maybe some of these things will be included in official release later.
vitalik_1984
Posts: 21
Joined: Sun 22. Jan 2006, 11:50
Contact:

Post by vitalik_1984 »

Kannst du vielleicht auch noch die install.txt in deutsch schreiben. Mein English ist sehr schlecht! Auf deutsch würde ich dann mehr verstehen was man machen muss.
markoehl
Posts: 50
Joined: Thu 29. Dec 2005, 11:08
Location: Zürich
Contact:

Post by markoehl »

vitalik_1984 wrote:wo finde die Datei die du verändert hast bzw. die komplette Datei.rar
Findest du neu unter http://www.alpine-davos.ch/phpwcms/ -> Login als Frontenduser -> Downloads
vitalik_1984 wrote:Eigentlich möchte ich das anders haben, ich weiß nicht ob das geht?
Der User soll auf die Seite kommen und nur das sehen was er sehen soll. Wenn er sich dann Anmeldet soll er z.b Downloads Seiten sehen oder sein Mailordner. Dann soll er sich der User registrieren können und so mit ein Account automatisch angelegt wird.
Ist mit phpwcms noch nicht möglich...
vitalik_1984 wrote:Dann habe ich noch versucht wie das der jscholtysik beschrieben eine Artikel anzulegen. Leider habe ich bei der Ariklzentrale keine Auswahl das login heißt. Ich habe alle wie Bilder,Html etc. aber nicht die Auswahl loggin. Was mache ich falsch, wie kriege eine Auswahl das loggin heißt.
Schau dir mal http://www.alpine-davos.ch/phpwcms/ an. Du kannst dich auch für's Backend anmelden und schauen wie das Login eingebaut ist. Wenn dir bei den contentparts noch kein Eintrag erschinet, musst du noch den Eintrag in article.contenttype.inc.php machen: 203 => $BL['be_ctype_login'],
Last edited by markoehl on Wed 1. Feb 2006, 20:02, edited 1 time in total.
jscholtysik

Post by jscholtysik »

Hallo Markus,


Dein Link funktioniert nicht... ;-)


Viele Grüße in die Schweiz.


Joachim
markoehl
Posts: 50
Joined: Thu 29. Dec 2005, 11:08
Location: Zürich
Contact:

Post by markoehl »

jscholtysik wrote:Dein Link funktioniert nicht... ;-)
Probleme beim Provider. Versuchs später noch einmal...
User avatar
StudioZ
Posts: 802
Joined: Fri 28. May 2004, 19:57
Location: Québec, Canada
Contact:

Post by StudioZ »

We've been waiting for such functionnality for so long now....
I guess that the only thing missing now to this great enhancement is:
a Sign up form through which submit new accounts, which would then
optionnaly have to be revised and approved or rejected by an Admin :roll:
Also some way to lock some files' downloads... would be awesome 8)

Cheers,
Image
PhpWCMS Evangelist, -- iRoutier.com Running phpWCMS 1.4.2, r354 -> Great Version!!!!
mckingtom
Posts: 5
Joined: Sat 4. Feb 2006, 02:46
Location: Bern
Contact:

Post by mckingtom »

StudioZ wrote:
Also some way to lock some files' downloads... would be awesome 8)
Hi everyone,

After days of searching through the forum and testing I discovered markoehl's login functionality (thanks for it!) and it works perfectly for what I need (separate access levels for different users). There is one problem, though, and I was unable to find the answer to it: files listed in an article with a file list are downloadable even after logging-out, i.e. if one knows the path to a specific file listed under a password-protected level, the download will by-pass the protection.

In practice it would not be so difficult to guess the path to a file but once downloaded its path is recorded in the browser's history.

Is there any solution to this or shall we just wait... :)
markoehl
Posts: 50
Joined: Thu 29. Dec 2005, 11:08
Location: Zürich
Contact:

Post by markoehl »

mckingtom wrote: files listed in an article with a file list are downloadable even after logging-out, i.e. if one knows the path to a specific file listed under a password-protected level, the download will by-pass the protection.
There is always a solution :wink: : I modified the file download.php and inc_front/content/cnt7.article.inc.php.

Check out the updated zip-File and read the instructions..
markoehl
Posts: 50
Joined: Thu 29. Dec 2005, 11:08
Location: Zürich
Contact:

Post by markoehl »

StudioZ wrote:We've been waiting for such functionnality for so long now....,
Thanx
StudioZ wrote:a Sign up form through which submit new accounts, which would then optionnaly have to be revised and approved or rejected by an Admin
Will proably work on that too..
StudioZ wrote:some way to lock some files' downloads... would be awesome
Great feedback. Check out the updated zip-File and read the instructions..
User avatar
StudioZ
Posts: 802
Joined: Fri 28. May 2004, 19:57
Location: Québec, Canada
Contact:

Post by StudioZ »

Hey Markoehl ! 8)
Just tested your modifications :wink:
Awesome and Great !
Now files can also be protected :D :D :D
Many Thanks again :D

Signup Form - Notes:
Just had these toughts for when you'll be ready...
01. Would be great to allow the admin to receive an email on a new signup that requires approval from the Admin.
02. Would be great to provide a password lost? feature
03. And the possibility for the user to edit his/her data

:wink: 8)

Cheers,
Image
PhpWCMS Evangelist, -- iRoutier.com Running phpWCMS 1.4.2, r354 -> Great Version!!!!
User avatar
StudioZ
Posts: 802
Joined: Fri 28. May 2004, 19:57
Location: Québec, Canada
Contact:

Post by StudioZ »

Me again Markoehl ... :wink:

Just modified your login form to make it fit in a left box or left column.
So, I simply ajusted the table to make sure the input field would be placed straight below the name of the field, just to save space.
I also added the $_SESSION["wcs_user"] variable to make sure we also show the login ID info, like:

Hello Yves
ID: StudioZ

This is working fine with the {SHOW_CONTENT:ID} RT

Here's the modified code in include/in_front/content/cnt203.article.inc.php
starting at line #195

Code: Select all

	// $CNT_TMP .= '<tr><td><img src="img/leer.gif" width="1" height="12"></td></tr>';
	$CNT_TMP .= '<tr><td nowrap class="v10">';
	$CNT_TMP .= $clogin["cuser"].'</td></tr>';
	$CNT_TMP .= '<tr><td class="v10"><input class="v10" name="form_loginname" type="text" id="form_loginname" style="width:'.$clogin["cbreite"].'px;" size="30" maxlength="30" value="'.html_specialchars($wcs_user).'"></td></tr>';
	$CNT_TMP .= '<tr><td><img src="img/leer.gif" width="1" height="3"></td></tr>';
	$CNT_TMP .= '<tr><td nowrap class="v10">'.$clogin["cpasswort"].'</td></tr>';
	$CNT_TMP .= '<tr><td class="v10"><input class="v10" name="form_password" type="password" id="form_password" style="width:'.$clogin["cbreite"].'px;" size="30" maxlength="20"></td></tr>';
	if ($clogin["clang"] == "1") {
	$CNT_TMP .= '<tr><td nowrap class="v10">'.$BL["login_lang"].'</td></tr>';
	$CNT_TMP .= '<tr><td class="v10"><select class="v10" name="form_lang" id="form_lang" style="width:'.$clogin["cbreite"].'px;">';

	// check available languages installed and build language selector menu
	$lang_dirs = opendir("include/inc_lang/backend");
	while($lang_codes = readdir( $lang_dirs )) {
		if( $lang_codes != "." && $lang_codes != ".." && file_exists("include/inc_lang/backend/".$lang_codes."/lang.inc.php")) {
			$CNT_TMP .= '<option value="'.$lang_codes.'"';
			$CNT_TMP .= ($lang_codes == $_SESSION["wcs_user_lang"]) ? " selected" : "";
			$CNT_TMP .= '>';
			$CNT_TMP .= (isset($BL[strtoupper($lang_codes)])) ? $BL[strtoupper($lang_codes)] : strtoupper($lang_codes);
			$CNT_TMP .= "</option>\n";
		}
	}
	closedir( $lang_dirs );

	$CNT_TMP .= '</select></td></tr>';
	}
	$CNT_TMP .= '<tr><td><img src="img/leer.gif" width="1" height="10"></td></tr>';
	$CNT_TMP .= '<tr><td><input name="Submit" type="submit" class="formButton" value="'.$BL["login_button"].'"><input name="form_aktion" type="hidden" id="form_aktion" value="login"></td></tr>';
	$CNT_TMP .= '<tr><td><img src="img/leer.gif" width="1" height="20"></td></tr>';
	$CNT_TMP .= '</table>';
	$CNT_TMP .= '</form>';
	$CNT_TMP .= '<script language="JavaScript" type="text/JavaScript">';
	$CNT_TMP .= 'window.document.login_formular.form_loginname.focus();';
	$CNT_TMP .= '</script>';

} else {
	//If user is already logged in
	// $CNT_TMP .= $BL['be_login_ok'].$_SESSION["wcs_user_name"];
	$CNT_TMP .= $BL['be_login_ok'];
	$CNT_TMP .= '<b>';
	$CNT_TMP .= $_SESSION["wcs_user_name"];
	$CNT_TMP .= '</b><br />ID: <b>';
	$CNT_TMP .= $_SESSION["wcs_user"];
	$CNT_TMP .= '</b>';
}
?>
Markoehl !
All my gratitude again for making this long awaited script available 8) 8) 8)

Cheers,
Image
PhpWCMS Evangelist, -- iRoutier.com Running phpWCMS 1.4.2, r354 -> Great Version!!!!
markoehl
Posts: 50
Joined: Thu 29. Dec 2005, 11:08
Location: Zürich
Contact:

Post by markoehl »

StudioZ wrote: Just modified your login form to make it fit in a left box or left column.
So, I simply ajusted the table to make sure the input field would be placed straight below the name of the field, just to save space.
I also added the $_SESSION["wcs_user"] variable to make sure we also show the login ID info, like:

Hello Yves
ID: StudioZ

This is working fine with the {SHOW_CONTENT:ID} RT
Thanx Mate! I included this code in my script.
mckingtom
Posts: 5
Joined: Sat 4. Feb 2006, 02:46
Location: Bern
Contact:

Post by mckingtom »

markoehl wrote:There is always a solution :wink: : I modified the file download.php and inc_front/content/cnt7.article.inc.php.

Check out the updated zip-File and read the instructions..
Thanks a lot, markoehl!!!
You made my day with the updated login contentpart.
phalancs
Posts: 793
Joined: Thu 19. Feb 2004, 05:09
Location: Germany

Post by phalancs »

Hallo Markkoehl

bzgl. der Gruppe: frontend & Backend user:
Das ist so, ja. Mir ist die Funktion des Frontend&Backenusers eh nicht ganz klar. Für diesen cntpart also Nur Frontend oder Backend auswählen.
Weisst Du denn eine Möglichkeit wie man auch die Option Fe & Be User funktionsfähig machen könnte? Ich denke, dass es doch sehr nützlich wäre, wenn bspw. ein Redakteur die Möglichkeit hätte im Backend die ihm zugeordneten Artikel zu bearbeiten und gleichzeitig auf versteckte Menüpunkte zugreifen könnte.

:)[/quote]
2008
markoehl
Posts: 50
Joined: Thu 29. Dec 2005, 11:08
Location: Zürich
Contact:

Post by markoehl »

phalancs wrote:Weisst Du denn eine Möglichkeit wie man auch die Option Fe & Be User funktionsfähig machen könnte? Ich denke, dass es doch sehr nützlich wäre, wenn bspw. ein Redakteur die Möglichkeit hätte im Backend die ihm zugeordneten Artikel zu bearbeiten und gleichzeitig auf versteckte Menüpunkte zugreifen könnte.
Das sollte schon gehen. Du kannst einen User erfassen, nicht admin aber Backenduser. Dann kannst da auf spezielle Folders Berechtigungen (struktur) setzen. Also normaler Benutzer sollte er dann nur die Artikel bearbeiten können welche er erfasst hat..
mckingtom
Posts: 5
Joined: Sat 4. Feb 2006, 02:46
Location: Bern
Contact:

Post by mckingtom »

Hi markoehl and all,

Just "discovered" another way to by-pass login. I'll give an example:
- two structure levels: A and B
- user1 has access to level A only
- user2 has access to levels A and B

If user1 is logged in he will only see level A. But if he knows the path to an article inside level B he will be able to access it (with level B still invisible); the article in level B is visible, not-public.

(When no user is logged-in, articles inside protected levels are not visible even if the path is known).
Post Reply