I am having some trouble figuring out how to change the links at the top of the PN_zClassifieds module. I want to remove 2 links at the top: "Suggest an ad" and "My account" because I'm charging for ad placement. I need to replace the links with a single link to a form (in ContentExpress) that has buttons that are PayPal checkout buttons.
I'm only giving access to specific categories in the Classifieds to specific groups after they make their purchase, so I want to avoid showing those links at the top.
I've looked at the
PHP files, specifically functions.php (code snippet below):
//menu home
function menuhome($cat) {
global [20] $cat, $ModName, $currentlang;
echo [21] "<link rel=\"StyleSheet\" href=\"modules/".$ModName."/style/style.css\" type=\"text/css\">\n";
OpenTable();
echo [22] "<center><a href=\"modules.php?op=modload&name=".$ModName."&file=index\"><img src=\"modules/".$ModName."/images/$currentlang/directories.jpg\" border=0></a></center>";
CloseTable();
OpenTable();
$menu = "[ <a href=\"modules.php?op=modload&name=".$ModName."&file=index\">"._HOME."</a>";
$menu .= " | <a href=\"modules.php?op=modload&name=".$ModName."&file=recent\">"._RECENTADS."</a>";
$menu .= " | <a href=\"modules.php?op=modload&name=".$ModName."&file=search\">"._SEARCHADS."</a> ] <br>";
$menu .= "[ <a href=\"modules.php?op=modload&name=".$ModName."&file=list";
if( $cat != "" )
{
$menu .= "&cat=$cat";
}
$menu .= "\">"._SUGGESTADS."</a>";
$menu .= " | <a href=\"modules.php?op=modload&name=".$ModName."&file=account\">"._CLZMYACCOUNT."</a> ]<br>";
$menu .= " [ <a href=\"modules.php?op=modload&name=".$ModName."&file=help\">"._HELP."</a>";
$menu .= " | <a href=\"modules.php?op=modload&name=".$ModName."&file=rules\">"._RULES."</a> ]";
echo [23] "<center><span class=\"classifieds-mainmenu\">".$menu."</span></center>";
CloseTable();
}
function menuClassify($sortby, $order, $url_ref){
global [24] $ModName, $config;
$label_price = $config['label_price'];
$label_type = $config['label_type'];
$tab_sort = array [25]();
$tab_sortname = array [26]();
$tab_sort[] = "add_date";
$tab_sortname[] = _DATE;
if($label_type >= 1) {
$tab_sort[] = "type";
$tab_sortname[] = _TYPE;
}
if($label_price) {
$tab_sort[] = "price";
$tab_sortname[] = _PRICE;
}
$tab_sort[] = "name";
$tab_sortname[] = _LOCATION;
$tab_sort[] = "statename";
$tab_sortname[] = _STATE;
$tab_sort[5] = "subject";
$tab_sortname[] = _SUBJECT;
$tab_order = array [27]("desc", "asc");
$tab_ordername = array [28](_ORDERDESC, _ORDERASC);
echo [29] " \n<div align= \"right\">";
echo [30] " <table border=\"0\" cellpadding=\"2\" cellspacing=\"0\">";
echo [31] " <form method=\"post\" action=\"modules.php?op=modload&name=".$ModName."&$url_ref\">";
echo [32] " <tr>";
echo [33] " <td>";
echo [34] " <span class=\"classifieds\">"._SORTBY."</span>";
echo [35] " </td>";
echo [36] " <td>";
echo [37] " <select class=\"classifieds-SELECT\" name=\"sortby\">";
$count_tab_sort = count [38]($tab_sort);
for($i=0;$i<$count_tab_sort;$i++) {
if($sortby == $tab_sort[$i]) $sel="selected"; else $sel="";
echo [39] " <option value=\"$tab_sort[$i]\"$sel>$tab_sortname[$i]</option>";
}
echo [40] " </select>";
echo [41] " </td>";
echo [42] " <td>";
echo [43] " <select class=\"classifieds-SELECT\" name=\"order\">";
$count_tab_order = count [44]($tab_order);
for($i=0;$i<$count_tab_order;$i++) {
if($order == $tab_order[$i]) $sel="selected"; else $sel="";
echo [45] " <option value=\"$tab_order[$i]\" $sel>$tab_ordername[$i]</option>";
}
echo [46] " </select>";
echo [47] " </td>";
echo [48] " <td><input class=\"classifieds-INPUT\" type=\"submit\" value=\"" . _OK . "\"></td>"; // onclick=\"return OnSearchSubmit('$err1')
echo [49] " </tr>";
echo [50] " </form>";
echo [51] " </table>";
echo [52] "</div>\n";
}
I
think this is what I need to change, but I don't know what I can or can't do without breaking the module. I have tried just adding the link to the language file (global.php) where "Suggest an ad" would be, but didn't work. Was hoping that would override it.
Any suggestions for a
PHP novice?