Permalink
Browse files

Fixed the issue where the 'participate at' link was always hardcoded.…

… Should load from the DB now, though I have to post-load insert it with JS. Annoying, but works and was easy to do.
  • Loading branch information...
1 parent 2870173 commit 380ad095436ecc6b2866c2bf4c7cb960fe258b63 @drewww committed Jun 6, 2011
View
@@ -75,7 +75,7 @@
<h2>
<?php
echo $html->link(
- __('backchan.nl - participate at http://fc2008.backchan.nl/', true),
+ __('backchan.nl - participate at http://backchan.nl/', true),
'http://backchan.nl/'
);
?>
@@ -20,6 +20,9 @@ $scriptContent .= $javascript->object(
"postfix"=>";\n")
);
+$scriptContent .= "var conferenceUsername=\"". $meeting['Conference']['username'] . "\";\n";
+
+
// This magic "inline"=false bit is a queue for cake to put the scripts
// into the header where they belong. Yay.
$javascript->codeBlock($scriptContent, array("inline"=>false));
View
@@ -31,6 +31,9 @@ $scriptContent .= $javascript->object(
);
$scriptContent .= "var showAdmin=" . $adminInterface . ";\n";
+
+$scriptContent .= "var conferenceUsername=\"". $meeting['Conference']['username'] . "\";\n";
+
if ($user == false) $scriptContent .= "var showIdentityDialog=true;\n";
else $scriptContent .= "var showIdentityDialog=false;\n";
@@ -31,7 +31,12 @@ function init()
{
success: refreshSuccessScreen,
}
- );
+ );
+
+ header = document.getElementById("header");
+ baseURL = conferenceUsername + ".backchan.nl";
+ header.innerHTML = "<h2><a href='http://" + baseURL +"'>participate at http://" + baseURL + "</a></h2>";
+
}
function refreshSuccessScreen(o, response)
@@ -34,6 +34,11 @@ function init() {
// Post Table
initDataTable();
+
+ // Now, mess with the header so it has the right name + link on it.
+ header = document.getElementById("header");
+ baseURL = conferenceUsername + ".backchan.nl";
+ header.innerHTML = "<h2><a href='http://" + baseURL +"'>" + baseURL + "</a></h2>";
}
function refreshMeeting() {

0 comments on commit 380ad09

Please sign in to comment.