Elxis CMS Forum
Extensions => Components => Topic started by: tmcgee123 on October 11, 2008, 09:23:44
-
The marketplace component works well except that Show Category does not seem to use the type ad select box. It always uses the defalut value. Is the $ad_type variable passed properly?
Beginning at line 172 I replaced the table select_table with a div and changed the forms named adsearch and adselect as follows:
echo "<div id=\"select_ads\">"; //select_ads
echo "<form class=\"marketplace\" action=\"".$mosConfig_live_site."/index.php?option=com_marketplace&page=show_category&catid=$catid&Itemid=$Itemid\" method=\"post\" name=\"adsearch\">";
echo "<input maxlength ='30' class='text' id='searchtext' type='text' name='searchtext' value=\"".$searchtext."\">";
echo "<input class='image' type='image' SRC=\"".$mosConfig_live_site."/components/com_marketplace/images/system/search.gif\" name=\"submit_search\" alt=\"".ELX_FORM_SUBMIT_SEARCH_TEXT."\" title=\"".ELX_FORM_SUBMIT_SEARCH_TEXT."\" value=\"".ELX_FORM_SUBMIT_SEARCH_TEXT."\">";
$database->setQuery("SELECT id, name FROM #__marketplace_types WHERE published='1' ORDER BY sort_order");
$rows_type = $database->loadObjectList();
echo "<select class='selectbox' name='ad_type'>";
echo "<option value='0' selected>".ELX_ALL."</option>";
foreach( $rows_type as $rowtype) {
if( $rowtype->id == $ad_type) {
echo "<option value='$rowtype->id' selected>$rowtype->name</option>";
}
else {
echo "<option value='$rowtype->id'>$rowtype->name</option>";
}
}
echo "</select>";
echo "</form>";
echo "<form class=\"marketplace\" action=\"".$mosConfig_live_site."/index.php?option=com_marketplace&page=show_category&catid=$catid&Itemid=$Itemid\" method=\"post\" name=\"adselect\">";
echo "<input class='image' type='image' SRC=\"".$mosConfig_live_site."/components/com_marketplace/images/system/refresh.gif\" alt=\"".ELX_FORM_SUBMIT_REFRESH_TEXT."\" title=\"".ELX_FORM_SUBMIT_REFRESH_TEXT."\" value=\"".ELX_FORM_SUBMIT_REFRESH_TEXT."\">";
echo "<input type='hidden' name='searchtext' value=''>";
echo "</form>";
echo "</div>"; //select_ads end
Note: I'm using images in place of buttons.
-
I will have to look as I forgot what was what in this component, I just quick fixed it when elxis-downloads was about to open. It was some Joomla component, and someone asked me to make it work with Elxis, so I must check out, and I will let you know. Do you have some link to this installation?
-
My site is local only at this time. The demo of the original joomla component is at:
http://www.joomster.com/index.php?option=com_marketplace&Itemid=41 (http://www.joomster.com/index.php?option=com_marketplace&Itemid=41)
Their demo doesn't work properly, however, the changes referred to in my previous post do work. Thanks for your reply.
Tim