Welcome to Geeklog Saturday, October 21 2017 @ 08:54 pm EDT


Status: offline

Kutulu

Forum User
Newbie
Registered: 04/06/2004
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">
UserFrownyou@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!

Status: offline

jnordquist

Forum User
Full Member
Registered: 14/03/2003
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

Status: offline

Euan

Forum User
Full Member
Registered: 22/04/2002
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">
UserFrownyou@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

Status: offline

Kutulu

Forum User
Newbie
Registered: 04/06/2004
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.

Status: offline

machinari

Forum User
Full Member
Registered: 22/03/2004
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

Status: offline

machinari

Forum User
Full Member
Registered: 22/03/2004
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

Status: offline

Kutulu

Forum User
Newbie
Registered: 04/06/2004
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?


Status: offline

machinari

Forum User
Full Member
Registered: 22/03/2004
Posts: 1512
caffeinated
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
PHP 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>


 
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..

Status: offline

kr

Forum User
Newbie
Registered: 02/03/2006
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
PHP 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

ptd-net.com

Anonymous
ur script didnt conatin /webmail

&lt;html&gt;
&lt;table&gt;&lt;tr&gt;&lt;td width=&quot;202&quot; align=&quot;center&quot;&gt;
&lt;form method=&quot;post&quot; action=&quot;http://ur domain.com/webmail/src/redirect.php&quot;&gt;
&lt;input type=&quot;hidden&quot; name=&quot;js_autodetect_results&quot; value=&quot;0&quot;&gt;
Ptd-net.com Webmail Login
&lt;br&gt; &lt;input type=&quot;text&quot; name=&quot;login_username&quot; size=&quot;20&quot;&gt;
&lt;br&gt;
Password:&lt;br&gt;
&lt;input type=&quot;password&quot; name=&quot;secretkey&quot; size=&quot;20&quot; /&gt;
&lt;br&gt;
&lt;input type=&quot;submit&quot; value=&quot;Login&quot;&gt;
&lt;br&gt;
&lt;br&gt;
&lt;/form&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/html&gt;

Kutulu

Anonymous
angry
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

coteyr

Anonymous
I like this to swollow a page in geeklog
PHP 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

All times are EDT. The time is now 08:54 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