Welcome to Geeklog, Anonymous Thursday, October 10 2024 @ 09:57 pm EDT
Geeklog Forums
How to create a Squirrelmail login block
Status: offline
Kutulu
Forum User
Newbie
Registered: 06/04/04
Posts: 6
I wanted to be able to login to my Squiremail from the home page so I created a block to do so. Thought I'd share.
Please note that your paths my differ a bit than mine so check them out.
Also, I have a link in the block for a SSL login redirect. If you don't use SSL, just take it out.
Type of block - Normal Block
Normal Block Options (code)-
<html>
<table><tr><td align="center">
<form method="post" action="http://yourdomain.com/src/redirect.php">
<input type="hidden" name="js_autodetect_results" value="0">
Useryou@domain.com)<br> <input type="text" name="login_username" size="10"><br>
Password:<br> <input type="password" name="secretkey" size="10">
<br><input type="submit" value="Login">
<br><br><a href='https://yourdomain.com/src/login.php'>Secure Login</a><br>
</form></td></tr></table>
</html>
Any issues... feel free to holler!
Please note that your paths my differ a bit than mine so check them out.
Also, I have a link in the block for a SSL login redirect. If you don't use SSL, just take it out.
Type of block - Normal Block
Normal Block Options (code)-
<html>
<table><tr><td align="center">
<form method="post" action="http://yourdomain.com/src/redirect.php">
<input type="hidden" name="js_autodetect_results" value="0">
Useryou@domain.com)<br> <input type="text" name="login_username" size="10"><br>
Password:<br> <input type="password" name="secretkey" size="10">
<br><input type="submit" value="Login">
<br><br><a href='https://yourdomain.com/src/login.php'>Secure Login</a><br>
</form></td></tr></table>
</html>
Any issues... feel free to holler!
19
16
Quote
Status: offline
jnordquist
Forum User
Full Member
Registered: 03/14/03
Posts: 129
Location:Kenosha
on mine, it just brings up another user authentication. Doesn't take the gl authentication or the post data.
John Nordquist,
Applications Specialist, medical Technologies
John Nordquist,
Applications Specialist, medical Technologies
17
15
Quote
Status: offline
Euan
Forum User
Full Member
Registered: 04/22/02
Posts: 292
Works for me, but you don't need any of the < html > tags.
<form method="post" action="http://yourdomain.com/src/redirect.php">
<input type="hidden" name="js_autodetect_results" value="0">
Useryou@domain.com)<br> <input type="text" name="login_username" size="10"><br>
Password:<br> <input type="password" name="secretkey" size="10">
<br><input type="submit" value="Login">
<br><br><a href='https://yourdomain.com/src/login.php'>Secure Login</a><br>
</form>
should be enough. What is your Squirrelmail version?
Cheers,
Euan.
-- Heather Engineering
-- No job too small
<form method="post" action="http://yourdomain.com/src/redirect.php">
<input type="hidden" name="js_autodetect_results" value="0">
Useryou@domain.com)<br> <input type="text" name="login_username" size="10"><br>
Password:<br> <input type="password" name="secretkey" size="10">
<br><input type="submit" value="Login">
<br><br><a href='https://yourdomain.com/src/login.php'>Secure Login</a><br>
</form>
should be enough. What is your Squirrelmail version?
Cheers,
Euan.
-- Heather Engineering
-- No job too small
17
18
Quote
Status: offline
Kutulu
Forum User
Newbie
Registered: 06/04/04
Posts: 6
Know what?? That's a good point Euan.
Versions DO matter in the real world dont' they?!?!
I'm running...
GL 1.3.9
SM 1.4.2
That code should run fine on any of the SM 1.4.X releases.
Also... thanks for pointing out the over abundance of html tags. Still kinda new to gl and wasn't even thinking on that one.
Versions DO matter in the real world dont' they?!?!
I'm running...
GL 1.3.9
SM 1.4.2
That code should run fine on any of the SM 1.4.X releases.
Also... thanks for pointing out the over abundance of html tags. Still kinda new to gl and wasn't even thinking on that one.
17
12
Quote
Status: Banned
machinari
Forum User
Full Member
Registered: 03/22/04
Posts: 1512
looks good, but it doesn't work for me.
keeps giving me a cpanel login box
i changed the paths and "redirect.php" to "login.php" and for some reason I have to use a port number. My newbie self just doesn't get it. any suggestions? running gl139 and sm14x.
mach
keeps giving me a cpanel login box
i changed the paths and "redirect.php" to "login.php" and for some reason I have to use a port number. My newbie self just doesn't get it. any suggestions? running gl139 and sm14x.
mach
28
14
Quote
Status: Banned
machinari
Forum User
Full Member
Registered: 03/22/04
Posts: 1512
i often reveal my idiot nature--you'll get used to it.
anyway, your stuff works great just the way it was, i just typed my password wrong
but now, because i like it so much, i'm gonna see if i can wrap the squirrel mail page itself into the gl interface
anyway, your stuff works great just the way it was, i just typed my password wrong
but now, because i like it so much, i'm gonna see if i can wrap the squirrel mail page itself into the gl interface
19
15
Quote
Status: offline
Kutulu
Forum User
Newbie
Registered: 06/04/04
Posts: 6
Machinari,
Good to hear! And I thought versions matter? Correct passwords are the REAL kicker!
Wrapping it in gl would be sweet. The only problem I could see with that is that it would definitely be custom and not to universal. I mean, SM likes to use alot of space in the browser and once you get logged in I have a feeling that depending on the gl theme your using it could look all squished (tech term!) together once logged in. Know what I mean Vern?
Good to hear! And I thought versions matter? Correct passwords are the REAL kicker!
Wrapping it in gl would be sweet. The only problem I could see with that is that it would definitely be custom and not to universal. I mean, SM likes to use alot of space in the browser and once you get logged in I have a feeling that depending on the gl theme your using it could look all squished (tech term!) together once logged in. Know what I mean Vern?
15
16
Quote
Status: Banned
machinari
Forum User
Full Member
Registered: 03/22/04
Posts: 1512
ok, my progress report. no problem wrapping SM in GL. I used an iframe in a static page and just readusted the path in the block form, Kutulu's code above, setting action to the static page url, using the target attribute, target="frame name"--and i gave the iframe a name, obviously.
as for squishyitus, i display the page without the right blocks and for the most part its all good. then you log out and the target="top" on the signout link gets ya--kinda defeats the purpose. Crap!
so i used neomail instead and it works great. except i cant get the login to work from the block so i'm just using the static page and signing into the http auth box that pops up.
my static page for NeoMail then is like this:
--create new static page
--check add to menu, you can always set perms at the bottom
--page format=left blocks, depending on your theme
--change your ID to something a bit more readable just incase you want to link to it from a sign in block like Kutulu's block for Squirrel Mail.
--set your perms
--done
--oh ya, here is my code
src="http://mydomain.ca/neomail/neomail.pl">
<a href="http://mydomain.ca/neomail/neomail.pl" target="_blank">
If you see this, then your browser is not supporting frames
and you will need to be shot. Pull rope...</a>
</iframe>
nothing magical about that except that now i feel like i should dye my hair blond in keeping with the amount of times that i've edited this fixing spelling booboos. 3:30am and nothing better to do than spill coffee on my keyboard..
as for squishyitus, i display the page without the right blocks and for the most part its all good. then you log out and the target="top" on the signout link gets ya--kinda defeats the purpose. Crap!
so i used neomail instead and it works great. except i cant get the login to work from the block so i'm just using the static page and signing into the http auth box that pops up.
my static page for NeoMail then is like this:
--create new static page
--check add to menu, you can always set perms at the bottom
--page format=left blocks, depending on your theme
--change your ID to something a bit more readable just incase you want to link to it from a sign in block like Kutulu's block for Squirrel Mail.
--set your perms
--done
--oh ya, here is my code
Text Formatted Code
<iframe name="webmail" width="100%" height="600" src="http://mydomain.ca/neomail/neomail.pl">
<a href="http://mydomain.ca/neomail/neomail.pl" target="_blank">
If you see this, then your browser is not supporting frames
and you will need to be shot. Pull rope...</a>
</iframe>
14
18
Quote
Status: offline
kr
Forum User
Newbie
Registered: 03/02/06
Posts: 4
Location:Germany
I like your ideas to swallow Squirrelmail into geeklog.
On our site i have used the iframe staticpages variation. Running into the same problem as machinari that the logout target=_top was not where i want to go. Cause i did not want to change to neomail - don't ask me why ... maybe cause "never touch a running system" ;-) - i've modified the target destination in the squirrelmail codebase.
If anyone else like to have the same here is the required change (based on Squirrelmail v1.4.4).
File: /usr/share/squirrelmail/functions/page_header.php
270 //displayInternalLink ('src/signout.php', _("Sign Out"), $frame_top);
271 displayInternalLink ('src/signout.php', _("Sign Out"), "_parent");
As you can see i've simply commented out the usage of _top as target and replaced by _parent.
Have fun in the sun ... c'ya ... KR
On our site i have used the iframe staticpages variation. Running into the same problem as machinari that the logout target=_top was not where i want to go. Cause i did not want to change to neomail - don't ask me why ... maybe cause "never touch a running system" ;-) - i've modified the target destination in the squirrelmail codebase.
If anyone else like to have the same here is the required change (based on Squirrelmail v1.4.4).
File: /usr/share/squirrelmail/functions/page_header.php
Text Formatted Code
270 //displayInternalLink ('src/signout.php', _("Sign Out"), $frame_top);
271 displayInternalLink ('src/signout.php', _("Sign Out"), "_parent");
As you can see i've simply commented out the usage of _top as target and replaced by _parent.
Have fun in the sun ... c'ya ... KR
18
19
Quote
ptd-net.com
Anonymous
ur script didnt conatin /webmail
<html>
<table><tr><td width="202" align="center">
<form method="post" action="http://ur domain.com/webmail/src/redirect.php">
<input type="hidden" name="js_autodetect_results" value="0">
Ptd-net.com Webmail Login
<br> <input type="text" name="login_username" size="20">
<br>
Password:<br>
<input type="password" name="secretkey" size="20" />
<br>
<input type="submit" value="Login">
<br>
<br>
</form></td></tr></table>
</html>
<html>
<table><tr><td width="202" align="center">
<form method="post" action="http://ur domain.com/webmail/src/redirect.php">
<input type="hidden" name="js_autodetect_results" value="0">
Ptd-net.com Webmail Login
<br> <input type="text" name="login_username" size="20">
<br>
Password:<br>
<input type="password" name="secretkey" size="20" />
<br>
<input type="submit" value="Login">
<br>
<br>
</form></td></tr></table>
</html>
13
22
Quote
Kutulu
Anonymous
That is the most stupid reply to a post I've ever seen.
"ur script didnt conatin /webmail"
Well... no kidding... why would it have webmail when I don't have webmail in my path! That's is a user defineable parameter in your apache configuration. I other words... you have it... I don't... but the ../src directory is the same.
Do you actually think yourdomain.com in my example is my real domain? No... it's an example so take it as such and leave the "you forgot this.." somewhere else. I'd love to say that I have time to build your site for you but eventually, you will actually have to think a little. Cut and pasting too much code is hazardous to your health!
Kutulu
"ur script didnt conatin /webmail"
Well... no kidding... why would it have webmail when I don't have webmail in my path! That's is a user defineable parameter in your apache configuration. I other words... you have it... I don't... but the ../src directory is the same.
Do you actually think yourdomain.com in my example is my real domain? No... it's an example so take it as such and leave the "you forgot this.." somewhere else. I'd love to say that I have time to build your site for you but eventually, you will actually have to think a little. Cut and pasting too much code is hazardous to your health!
Kutulu
16
11
Quote
coteyr
Anonymous
I like this to swollow a page in geeklog
<script type="text/javascript">
/***********************************************
* IFrame SSI script II- © Dynamic Drive DHTML code library (http://www.dynamicdrive.com)
* Visit DynamicDrive.com for hundreds of original DHTML scripts
* This notice must stay intact for legal use
***********************************************/
//Input the IDs of the IFRAMES you wish to dynamically resize to match its content height:
//Separate each ID with a comma. Examples: ["myframe1", "myframe2"] or ["myframe"] or [] for none:
var iframeids=["myframe"]
//Should script hide iframe from browsers that don't support this script (non IE5+/NS6+ browsers. Recommended):
var iframehide="yes"
var getFFVersion=navigator.userAgent.substring(navigator.userAgent.indexOf("Firefox")).split("/")[1]
var FFextraHeight=parseFloat(getFFVersion)>=0.1? 16 : 0 //extra height in px to add to iframe in FireFox 1.0+ browsers
function resizeCaller() {
var dyniframe=new Array()
for (i=0; i<iframeids.length; i++){
if (document.getElementById)
resizeIframe(iframeids[i])
//reveal iframe for lower end browsers? (see var above):
if ((document.all || document.getElementById) && iframehide=="no"){
var tempobj=document.all? document.all[iframeids[i]] : document.getElementById(iframeids[i])
tempobj.style.display="block"
}
}
}
function resizeIframe(frameid){
var currentfr=document.getElementById(frameid)
if (currentfr && !window.opera){
currentfr.style.display="block"
if (currentfr.contentDocument && currentfr.contentDocument.body.offsetHeight) //ns6 syntax
currentfr.height = currentfr.contentDocument.body.offsetHeight+FFextraHeight;
else if (currentfr.Document && currentfr.Document.body.scrollHeight) //ie5+ syntax
currentfr.height = currentfr.Document.body.scrollHeight;
if (currentfr.addEventListener)
currentfr.addEventListener("load", readjustIframe, false)
else if (currentfr.attachEvent){
currentfr.detachEvent("onload", readjustIframe) // Bug fix line
currentfr.attachEvent("onload", readjustIframe)
}
}
}
function readjustIframe(loadevt) {
var crossevt=(window.event)? event : loadevt
var iframeroot=(crossevt.currentTarget)? crossevt.currentTarget : crossevt.srcElement
if (iframeroot)
resizeIframe(iframeroot.id);
}
function loadintoIframe(iframeid, url){
if (document.getElementById)
document.getElementById(iframeid).src=url
}
if (window.addEventListener)
window.addEventListener("load", resizeCaller, false)
else if (window.attachEvent)
window.attachEvent("onload", resizeCaller)
else
window.onload=resizeCaller
</script> <iframe scrolling="no" frameborder="0" id="myframe" src="/flyspray/" marginwidth="0" marginheight="0" vspace="0" hspace="0" style="overflow: visible; width: 100%; display: none;"></iframe>
should work with squirlmail too
Text Formatted Code
<script type="text/javascript">
/***********************************************
* IFrame SSI script II- © Dynamic Drive DHTML code library (http://www.dynamicdrive.com)
* Visit DynamicDrive.com for hundreds of original DHTML scripts
* This notice must stay intact for legal use
***********************************************/
//Input the IDs of the IFRAMES you wish to dynamically resize to match its content height:
//Separate each ID with a comma. Examples: ["myframe1", "myframe2"] or ["myframe"] or [] for none:
var iframeids=["myframe"]
//Should script hide iframe from browsers that don't support this script (non IE5+/NS6+ browsers. Recommended):
var iframehide="yes"
var getFFVersion=navigator.userAgent.substring(navigator.userAgent.indexOf("Firefox")).split("/")[1]
var FFextraHeight=parseFloat(getFFVersion)>=0.1? 16 : 0 //extra height in px to add to iframe in FireFox 1.0+ browsers
function resizeCaller() {
var dyniframe=new Array()
for (i=0; i<iframeids.length; i++){
if (document.getElementById)
resizeIframe(iframeids[i])
//reveal iframe for lower end browsers? (see var above):
if ((document.all || document.getElementById) && iframehide=="no"){
var tempobj=document.all? document.all[iframeids[i]] : document.getElementById(iframeids[i])
tempobj.style.display="block"
}
}
}
function resizeIframe(frameid){
var currentfr=document.getElementById(frameid)
if (currentfr && !window.opera){
currentfr.style.display="block"
if (currentfr.contentDocument && currentfr.contentDocument.body.offsetHeight) //ns6 syntax
currentfr.height = currentfr.contentDocument.body.offsetHeight+FFextraHeight;
else if (currentfr.Document && currentfr.Document.body.scrollHeight) //ie5+ syntax
currentfr.height = currentfr.Document.body.scrollHeight;
if (currentfr.addEventListener)
currentfr.addEventListener("load", readjustIframe, false)
else if (currentfr.attachEvent){
currentfr.detachEvent("onload", readjustIframe) // Bug fix line
currentfr.attachEvent("onload", readjustIframe)
}
}
}
function readjustIframe(loadevt) {
var crossevt=(window.event)? event : loadevt
var iframeroot=(crossevt.currentTarget)? crossevt.currentTarget : crossevt.srcElement
if (iframeroot)
resizeIframe(iframeroot.id);
}
function loadintoIframe(iframeid, url){
if (document.getElementById)
document.getElementById(iframeid).src=url
}
if (window.addEventListener)
window.addEventListener("load", resizeCaller, false)
else if (window.attachEvent)
window.attachEvent("onload", resizeCaller)
else
window.onload=resizeCaller
</script> <iframe scrolling="no" frameborder="0" id="myframe" src="/flyspray/" marginwidth="0" marginheight="0" vspace="0" hspace="0" style="overflow: visible; width: 100%; display: none;"></iframe>
should work with squirlmail too
13
18
Quote
All times are EDT. The time is now 09:57 pm.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content