Zikula: A Flexible Open Source Content Management System
home | forum | contact us

Dizkus

Bottom
Changing links in PN_zClassifieds
  • Posted: 16.04.2004, 18:19
     
    Vermillien
    rank:
    Helper Helper
    registered:
     February 2004
    Status:
    offline
    last visit:
    20.11.05
    Posts:
    155
    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):

    Code

    //menu home

        function menuhome($cat) {

            global $cat, $ModName, $currentlang;

           

            echo "<link rel=\"StyleSheet\" href=\"modules/".$ModName."/style/style.css\" type=\"text/css\">\n";

           

            OpenTable();

            echo "<center><a href=\"modules.php?op=modload&name=".$ModName."&amp;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."&amp;file=recent\">"._RECENTADS."</a>";

            $menu .= " | <a href=\"modules.php?op=modload&name=".$ModName."&amp;file=search\">"._SEARCHADS."</a> ] <br>";

           

           

            $menu .= "[ <a href=\"modules.php?op=modload&name=".$ModName."&amp;file=list";

            if( $cat != "" )

            {

                $menu .= "&amp;cat=$cat";   

            }

            $menu .= "\">"._SUGGESTADS."</a>";

            $menu .= " | <a href=\"modules.php?op=modload&name=".$ModName."&amp;file=account\">"._CLZMYACCOUNT."</a> ]<br>";

           

            $menu .= " [ <a href=\"modules.php?op=modload&name=".$ModName."&amp;file=help\">"._HELP."</a>";

           

            $menu .= " | <a href=\"modules.php?op=modload&name=".$ModName."&amp;file=rules\">"._RULES."</a> ]";

           

            echo "<center><span class=\"classifieds-mainmenu\">".$menu."</span></center>";

           

           

            CloseTable();

           

        }



        function menuClassify($sortby, $order, $url_ref){

            global $ModName, $config;

            $label_price = $config['label_price'];

            $label_type = $config['label_type'];

           

            $tab_sort = array();

            $tab_sortname = array();

           

            $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("desc", "asc");

            $tab_ordername = array(_ORDERDESC, _ORDERASC);

            echo "  \n<div align= \"right\">";

            echo "  <table border=\"0\" cellpadding=\"2\" cellspacing=\"0\">";

            echo "  <form method=\"post\" action=\"modules.php?op=modload&name=".$ModName."&amp;$url_ref\">";

            echo "    <tr>";

            echo "      <td>";     

            echo "       <span class=\"classifieds\">"._SORTBY."</span>";

            echo "      </td>";    

            echo "      <td>";     

            echo "       <select class=\"classifieds-SELECT\" name=\"sortby\">";

            $count_tab_sort = count($tab_sort);

            for($i=0;$i<$count_tab_sort;$i++) {

                if($sortby == $tab_sort[$i]) $sel="selected"; else $sel="";

                echo "      <option value=\"$tab_sort[$i]\"$sel>$tab_sortname[$i]</option>";       

            }

            echo "      </select>";

            echo "    </td>";

           

            echo "    <td>";       

            echo "       <select class=\"classifieds-SELECT\" name=\"order\">";

            $count_tab_order = count($tab_order);

            for($i=0;$i<$count_tab_order;$i++) {

                if($order == $tab_order[$i]) $sel="selected"; else $sel="";

                echo "      <option value=\"$tab_order[$i]\" $sel>$tab_ordername[$i]</option>";    

            }

            echo "      </select>";

            echo "    </td>";

            echo "      <td><input class=\"classifieds-INPUT\" type=\"submit\" value=\"" . _OK . "\"></td>"; // onclick=\"return OnSearchSubmit('$err1')

            echo "    </tr>";

            echo "  </form>";

            echo "  </table>";

            echo "</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?

Extensions Moderation

Main Menu

Extensions Database

Documentation

Development

Login

Donate to Zikula