Received a batch of docs from RR-R with bios, photos and abstracts for all of the speakers (missing one photo and one abstract). Integrated these into the Lectures page, and also tweaked the CSS a bit to give the hide/show blocks drop-shadows.
I had an image and wanted to put a caption centered below the image. The img was floated right by css selector for class "feature_publication_image". The img element has no caption attribute, I didn't want to use a table and table caption in the XHTML and similarly didn't want to use css display: table-cell and display: table-caption, so ended up creating this xhtml structure:
<div class="feature_publication_image"><img ... /><p>Caption</p></div>
and then modifying the css from this:
img.feature_publication_image {
float:right;
padding-right: 1em;
padding-left: 0.5em;
}
to this:
img.feature_publication_image , div.feature_publication_image {
float:right;
padding-right: 1em;
padding-left: 0.5em;
}
div.feature_publication_image p {
text-align:center;
}
McLean page added to /people/mclean
, and entry added to /includes/secondaryNavbar.php
, per request from EW.
EW got back to me with details of the two new profs (still missing a bio, but enough), so I created the new prof pages and checked they worked. The 301 course was still not showing up on the prof's page, so I checked around, and eventually found that in the /includes/course_listing/courses_taught.php
page, the block of code handling this prof's courses had been tagged with the wrong prof id. Now fixed, and all seems to be working, so I've made the names back into links on the People index.php
page and the secondaryNavbar.php
include.
Got a message from EW, following up on a request she had sent to Stew in July, for two new staff to be added and one to be removed. Looking at the site, it seems that this had been partially done; on the main "people" page, the new people were there, and the old one gone, but when you navigate to an individual prof's page, there's another menu on the left showing all the people, and this had not been updated. Reading through this post helped me figure out the site structure, and I was able to update /includes/secondaryNavbar.php
to comment out the person who's gone, and add new entries for the new people. There is, as yet, no info for the new people -- EW is going to get back to me with that -- so I've made their links on the navbar pop up a little "coming soon" message. On the main people page, their names are not links yet.
As soon as I get what I need from EW, I'll complete the pages for the two people concerned, and make the links point to the right place.
Small update on DR's instructions.
Third of three posts on different aspects of this topic. The site uses the get array to keep track of which language to use in the interface and which string to query on. A third problem is that the elements which allowed the user to switch languages did not check for other values in the GET array, and so those were lost. Specifically, the value of the q key-value pair was lost, so if you changed languages, you got the default search returning all the values in the db.
Here's a simplified version of the problem code:
<div id="languages-c">
<h3><a title="English" href="?lang=english"> English</a></h3>
<h3><a title="Français" href="?lang=french"> Français</a></h3>
<h3><a title="Русский" href="?lang=russian"> Русский</a></h3>
</div>
and here's the replacement that retains the key-value pair for q as well:
<?php
$qInURL = "";
$conjunction = "&";
if (isset ($_GET['q'])) {
$qInURL .= $conjunction . 'q='. $_GET['q'];
}
?>
<div id="languages-c">
<h3><a title="English" href="?lang=english"> English</a></h3>
<h3><a title="Français" href="?lang=french<?php echo $qInURL ?>"> Français</a></h3>
<h3><a title="Русский" href="?lang=russian<?php echo $qInURL ?>"> Русский</a></h3>
</div>
The image archive search page includes a button on the form to toggle between the simple search (on index.php) and the advanced search (on search.php - a very similar page to index.php). The problem is that when the user toggled from basic to advanced, the interface always went to English rather than maintaining the current setting (French, English, Russian).
The problem was that the php to create the URL in the onclick event of that button did not check for the state of items in the GET array other than q, so the lang key-value pair was lost, resulting in the page reverting to the default language (English).
Here's a simplified version of the original php. The problematic bit are the lines creating toggleSearchURL:
$toggleSearchMode = '<div id="toggles">';
$toggleSearchMode .= '<button onclick="window.location=\'';
$toggleSearchURL = 'search.php';
if (isset ($_GET['q'])) {$toggleSearchURL .= '?q='. $_GET['q'];}
$toggleSearchMode .= $toggleSearchURL;
$toggleSearchMode .= '\'"><span class="english">Advanced search</span><span class="french">Recherche avancée</span><span class="russian">Расширенный поиск</span>';
$toggleSearchMode .= '</button>';
$toggleSearchMode .= '</div><!--toggles-->';
echo $toggleSearchMode;
and here's the modified php which preserves both lang and q key-value pairs:
$toggleSearchMode = '<div id="toggles">';
$toggleSearchMode .= '<button onclick="window.location=\'';
$toggleSearchURL = 'search.php';
if (count($_GET) > 0 ) {$toggleSearchURL .= "?";}
$conjunction = "";
if (isset ($_GET['q'])) {
$toggleSearchURL .= 'q='. $_GET['q'];
$conjunction = "&";
}
if (isset ($_GET['lang'])) {
$toggleSearchURL .= $conjunction . 'lang='. $_GET['lang'];
$conjunction = "&";
}
$toggleSearchMode .= $toggleSearchURL;
$toggleSearchMode .= '\'"><span class="english">Advanced search</span><span class="french">Recherche avancée</span><span class="russian">Расширенный поиск</span>';
$toggleSearchMode .= '</button>';
$toggleSearchMode .= '</div><!--toggles-->';
echo $toggleSearchMode;
With not much work, this could be turned into a little function which goes through the entire get array.
I have rsyncs set up to manage transitions from dev to live, dev to dev on the server, and live to live on the server. The domain appears not to have been registered yet.