On 10/11/07, <b class="gmail_sendername">Kevin Squire</b> &lt;<a href="mailto:gentgeen@linuxmail.org">gentgeen@linuxmail.org</a>&gt; wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>I know this is not the SM mailing list, just hoping someone could answer this for me...<br><br>It a little while, we are going to be using our SM install for 2 different domains.&nbsp;&nbsp;I found that I can set the org/domain name to be based on the server name, which is exactly what we needed.&nbsp;&nbsp;Before I changed it, I had:
<br>&nbsp;&nbsp;&nbsp;&nbsp;$org_name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= &quot;<a href="http://mygroup.org">mygroup.org</a>&#39;;<br>and SM is reached by going to <a href="http://mail.mygroup.org">mail.mygroup.org</a><br><br>Now from what I read, I can set the $org_name and $domain settings in the config file to be:
<br>&nbsp;&nbsp;&nbsp;&nbsp;$org_name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= $_SERVER[&#39;SERVER_NAME&#39;];<br>&nbsp;&nbsp;&nbsp;&nbsp;$domain = $_SERVER[&#39;SERVER_NAME&#39;];<br><br>The problem I have noticed is that the $org_name now is showing up as &quot;<a href="http://mail.mygroup.org">
mail.mygroup.org</a>&quot; on the login page and elsewhere.&nbsp;&nbsp;I would really prefer that it was without the mail part.<br><br>The other domain will follow the same settings (<a href="http://mail.newgroup.com">mail.newgroup.com
</a> and a prefered $org_name of <a href="http://newgroup.com">newgroup.com</a>)<br><br>So any thoughts on how to remove the mail. part of the name for the $org_name setting?<br><br><br></blockquote></div><br>I would do something like this
<br><br>$org_name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= substr(stristr($_SERVER[&#39;SERVER_NAME&#39;], &#39;.&#39;), 1)<br><br>stristr($_SERVER[&#39;SERVER_NAME&#39;], &#39;.&#39;) should return &quot;.mygroup.org&quot;<br>substr should strip out the &quot;.&quot; and return &quot;
<a href="http://mygroup.org">mygroup.org</a>&quot;<br><br>I didn&#39;t test this, but it should be pretty close<br><br clear="all">Chris<br>-- <br>&quot;They that would trade essential liberty for a little temporary safety deserve neither.&quot; -- Benjamin Franklin