Pages

Showing posts with label php. Show all posts
Showing posts with label php. Show all posts

Tuesday, November 30, 2010

Meta data and general settings unified into internationalised event UI

keywords META tag as a setting in the event list



Which means you can edit as any other event and internationalise accordingly.





function getPageMetaHTML($category)
{
$sql='select id from events where token="meta" and fenabled=1 and category="'.$category.'"';
if(($result=getDB()->query($sql))==false)
return "";

if($result->num_rows==0){
if($category!="index"){
return getPageMetaHTML("index");
}else
return "";
}
$res="";
while($r=$result->fetch_assoc()){
getEventLocaleFields(&$r);
$res.='<meta name="'.$r{"title"}.'" content="'.$r{"event"}.'">';
}
return $res;
}




--
My Emacs Files At GitHub

Tuesday, November 2, 2010

Moved from mysql functions mysqli class.


@mysql function calls pretty much deprecated in php. Moved all the code to
mysqli based. Pretty straightforward. e.g



$f=@fopen("authinfo","r",true);
$auth=explode(" ",@fgets($f));
@fclose($f);
setDB($mysqli = new mysqli($auth{3},$auth{0},$auth{1},$auth{2}));
if ($mysqli->connecterror) {
die('Connect Error (' . $mysqli->connecterrno . ') '
. $mysqli->connecterror);
}


--
My Emacs Files At GitHub

Wednesday, October 13, 2010

Drop down menus live from mySQL using CSS


I was preparing to entire the hazy horrible world of Java script to provide
event links from the navigation toolbar. And then! Bing! Why not use CSS? And it
works. Super. Click on the annoying advert below to take a gander …





MyUpload.org



--
My Emacs Files At GitHub