|
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Messages - dan4ever
31
« on: March 08, 2015, 02:13:23 pm »
Thanks!!!
The problem was the "category allows pictures".
/Dan
32
« on: March 08, 2015, 10:19:54 am »
Here is the listing. A test but no place to put a picture like in "Store"
33
« on: March 08, 2015, 10:17:03 am »
We can't find where to insert a picture!!
And the code is
// ClassifiedsBlock(2,4, 'random','vertical'); ClassifiedsBlock(1,3, 'random','vertical'); // ClassifiedsBlock(2,4, 'random','horizonstal');
function ClassifiedsBlock($rows = 4, $listings = 4, $type = 'recent', $category = 0, $format = 'vertical', $startHtml = '', $endHtml = '') { global $smcFunc, $scripturl, $txt, $modSettings, $boardurl, $user_info, $context, $sourcedir, $boarddir;
$rows = (int) $rows; $listings = (int) $listings; $category = (int) $category;
// Html Header echo $startHtml; // Load the language files if (loadlanguage('classifieds') == false) loadLanguage('classifieds', 'english'); $g_manage = allowedTo('smfclassifieds_manage'); $groupsdata = implode($user_info['groups'],','); if (empty($modSettings['class_url'])) $modSettings['class_url'] = $boardurl . '/classifieds/';
if (empty($modSettings['class_path'])) $modSettings['class_path'] = $boarddir . '/classifieds/'; $maxrowlevel = $rows; echo '<table cellspacing="0" cellpadding="5" border="0" align="center" width="100%"> '; // Check what type it is $query = ' '; switch($type) { case 'recent': $query = "SELECT i.ID_LISTING, i.commenttotal, i.primaryID_PICTURE, i.title, p.thumbfilename, p.remotefilename, i.currentbid,i.currency, i.datelisted, i.views, i.is_auction, i.totalbids, i.ID_CAT, c.noprice, i.expiredate FROM {db_prefix}class_listing as i LEFT JOIN {db_prefix}class_listing_pic as p ON (i.primaryID_PICTURE = p.ID_PICTURE) LEFT JOIN {db_prefix}class_cat as c ON (i.ID_CAT = c.ID_CAT) LEFT JOIN {db_prefix}class_catperm AS r ON (r.ID_GROUP IN ($groupsdata) AND r.ID_CAT = i.ID_CAT) WHERE i.removed = 0 AND i.approved = 1 AND (r.view IS NULL || r.view =1) GROUP BY i.ID_LISTING ORDER BY i.ID_LISTING DESC LIMIT $listings"; break;
case 'viewed': $query = "SELECT i.ID_LISTING, i.commenttotal, i.primaryID_PICTURE, i.title, p.thumbfilename, p.remotefilename, i.currentbid,i.currency, i.datelisted, i.views, i.is_auction, i.totalbids, i.ID_CAT, c.noprice, i.expiredate FROM {db_prefix}class_listing as i LEFT JOIN {db_prefix}class_listing_pic as p ON (i.primaryID_PICTURE = p.ID_PICTURE) LEFT JOIN {db_prefix}class_cat as c ON (i.ID_CAT = c.ID_CAT) LEFT JOIN {db_prefix}class_catperm AS r ON (r.ID_GROUP IN ($groupsdata) AND r.ID_CAT = i.ID_CAT) WHERE i.removed = 0 AND i.approved = 1 AND (r.view IS NULL || r.view =1) GROUP BY i.ID_LISTING ORDER BY i.views DESC LIMIT $listings"; break; case 'random': $query = "SELECT i.ID_LISTING, i.commenttotal, i.primaryID_PICTURE, i.title, p.thumbfilename, p.remotefilename, i.currentbid,i.currency, i.datelisted, i.views, i.is_auction, i.totalbids, i.ID_CAT, c.noprice, i.expiredate FROM {db_prefix}class_listing as i LEFT JOIN {db_prefix}class_listing_pic as p ON (i.primaryID_PICTURE = p.ID_PICTURE) LEFT JOIN {db_prefix}class_cat as c ON (i.ID_CAT = c.ID_CAT) LEFT JOIN {db_prefix}class_catperm AS r ON (r.ID_GROUP IN ($groupsdata) AND r.ID_CAT = i.ID_CAT) WHERE i.removed = 0 AND i.approved = 1 AND (r.view IS NULL || r.view =1) GROUP BY i.ID_LISTING ORDER BY RAND() DESC LIMIT $listings"; break;
case 'mostcomments': $query = "SELECT i.ID_LISTING, i.commenttotal, i.primaryID_PICTURE, i.title, p.thumbfilename, p.remotefilename, i.currentbid,i.currency, i.datelisted, i.views, i.is_auction, i.totalbids, i.ID_CAT, c.noprice, i.expiredate FROM {db_prefix}class_listing as i LEFT JOIN {db_prefix}class_listing_pic as p ON (i.primaryID_PICTURE = p.ID_PICTURE) LEFT JOIN {db_prefix}class_cat as c ON (i.ID_CAT = c.ID_CAT) LEFT JOIN {db_prefix}class_catperm AS r ON (r.ID_GROUP IN ($groupsdata) AND r.ID_CAT = i.ID_CAT) WHERE i.removed = 0 AND i.approved = 1 AND (r.view IS NULL || r.view =1) GROUP BY i.ID_LISTING ORDER BY i.commenttotal DESC LIMIT $listings"; break;
case 'featured': $query = "SELECT i.ID_LISTING, i.commenttotal, i.primaryID_PICTURE, i.title, p.thumbfilename, p.remotefilename, i.currentbid,i.currency, i.datelisted, i.views, i.is_auction, i.totalbids, i.ID_CAT, c.noprice, i.expiredate FROM {db_prefix}class_listing as i LEFT JOIN {db_prefix}class_listing_pic as p ON (i.primaryID_PICTURE = p.ID_PICTURE) LEFT JOIN {db_prefix}class_cat as c ON (i.ID_CAT = c.ID_CAT) LEFT JOIN {db_prefix}class_catperm AS r ON (r.ID_GROUP IN ($groupsdata) AND r.ID_CAT = i.ID_CAT) WHERE i.removed = 0 AND i.approved = 1 AND i.featuredlisting = 1 AND (r.view IS NULL || r.view =1) GROUP BY i.ID_LISTING ORDER BY i.ID_LISTING DESC LIMIT $listings"; break; } // Execute the SQL query $dbresult = $smcFunc['db_query']('', $query); $rowlevel = 0; while($row = $smcFunc['db_fetch_assoc']($dbresult)) { if ($rowlevel == 0) echo '<tr class="windowbg2">';
echo '<td align="center"><a href="', $scripturl, '?action=classifieds;sa=view;id=', $row['ID_LISTING'], '">', $row['title'], '</a><br />'; if (!empty($row['primaryID_PICTURE']) && $modSettings['class_catlist_showimage']) { if (empty($row['remotefilename'])) echo '<a href="', $scripturl, '?action=classifieds;sa=view;id=', $row['ID_LISTING'], '"><img src="', $modSettings['class_url'], $row['thumbfilename'], '" alt="" /></a><br />'; else echo '<a href="', $scripturl, '?action=classifieds;sa=view;id=', $row['ID_LISTING'], '"><img src="', $row['remotefilename'], '" alt="" /></a><br />'; } echo '<span class="smalltext">'; if (!empty($modSettings['class_catlist_currentprice']) && $row['noprice'] == 0) echo $txt['class_text_price'] . SMFEzformatprice($row['currentbid'],$row['currency']) . '<br />';
if (!empty($modSettings['class_catlist_listingdate'])) { if (!empty($modSettings['class_set_date_format_mdy'])) echo $txt['class_text_date'] . date($modSettings['class_set_date_format_mdy'],$row['datelisted']), ' ', date($modSettings['class_set_date_format_hia'],$row['datelisted']) . '<br />'; else echo $txt['class_text_date'] . date("m/d/Y",$row['datelisted']) . ' ' . date("h:i a",$row['datelisted']) . '<br />'; } if ($modSettings['class_catlist_timeleft']) { echo $txt['class_txt_time_left'] ; echo ($row['expiredate'] == 0 ? $txt['class_expire_never'] : SMFezblockclass_cattimeleft( date("Y",$row['expiredate']), date("m",$row['expiredate']), date("d",$row['expiredate']), date("H",$row['expiredate']), date("i",$row['expiredate']),date("s",$row['expiredate'])) ) , '<br />'; } if (!empty($modSettings['class_catlist_numofbids']) && $row['noprice'] == 0 && $row['is_auction'] == 1) echo $txt['class_text_totalbids'] . ' ' . $row['totalbids'] . '<br />'; if (!empty($modSettings['class_catlist_comments'])) echo $txt['class_text_comments'] . ' (<a href="' . $scripturl . '?action=classifieds;sa=view;id=' . $row['ID_LISTING'] . '">' . $row['commenttotal'] . '</a>)<br />'; if ($g_manage) { if ($row['is_auction'] == 0) echo ' <a href="' . $scripturl . '?action=classifieds;sa=editlisting;id=' . $row['ID_LISTING'] . '">' . $txt['class_text_edit'] . '</a>'; else echo ' <a href="' . $scripturl . '?action=classifieds;sa=editauction;id=' . $row['ID_LISTING'] . '">' . $txt['class_text_edit'] . '</a>'; echo ' <a href="' . $scripturl . '?action=classifieds;sa=deletelisting;id=' . $row['ID_LISTING'] . '">' . $txt['class_text_delete'] . '</a>'; } echo '<hr>' ; echo '</span></td>';
if($rowlevel < ($maxrowlevel-1)) $rowlevel++; else { echo '</tr>'; $rowlevel = 0; } } if($rowlevel !=0) { echo '</tr>'; }
echo ' </table><br />'; // Free the Mysql Resoruces $smcFunc['db_free_result']($dbresult); // Html Footer echo $endHtml; } function SMFEzformatprice($price,$currency) { if ($currency == 'USD') return '$' . number_format($price, 2, '.', ''); else if ($currency == 'GBP') return '£' . number_format($price, 2, '.', ''); elseif ($currency == 'CAD') return '$' . number_format($price, 2, '.', ''); elseif ($currency == 'AUD') return '$' . number_format($price, 2, '.', ''); elseif ($currency == 'ZAR') return 'R ' . number_format($price, 2, '-', ''); else return $price . ' ' . $currency; }
function SMFezblockclass_cattimeleft($year, $month, $day, $hour, $minute, $seconds) { global $txt; // make a unix timestamp for the given date $the_countdown_date = mktime($hour, $minute, $seconds, $month, $day, $year, -1);
// get current unix timestamp $today = forum_time(false);
$difference = $the_countdown_date - $today; if ($difference < 0) $difference = 0;
$days_left = floor($difference/60/60/24); $hours_left = floor(($difference - $days_left*60*60*24)/60/60); $minutes_left = floor(($difference - $days_left*60*60*24 - $hours_left*60*60)/60); $seconds_left = floor(($difference - $days_left*60*60*24 - $hours_left*60*60 - $minutes_left*60));
if ($days_left == 0 && $hours_left == 0 && $minutes_left < 5 && ($minutes_left != 0 && $seconds_left !=0)) { echo '<font color="#FF0000">'; } echo '<span class="smalltext">'; if ($days_left > 0) { echo $days_left . 'd ' . $hours_left . 'h ' . $minutes_left . 'm'; } else { if ($hours_left > 0) echo $hours_left . 'h ' . $minutes_left . 'm'; else { if ($minutes_left > 0) echo $minutes_left . 'm ' . $seconds_left . 's'; else { if ($seconds_left > 0) echo $seconds_left . 's'; } } }
echo '</span>'; if ($days_left == 0 && $hours_left == 0 && $minutes_left < 5 && ($minutes_left != 0 && $seconds_left !=0)) { echo '</font>'; } }
34
« on: March 08, 2015, 09:16:34 am »
Hi
We have problem to insert an image för a "listing".
Its not easy to understand where to insert an image. I got a lots of question about this issue.
And I use Simpleportal with a block and it cant show any image from Classifields but from "Store" its no problem.
/Dan
35
« on: December 30, 2014, 02:53:45 pm »
But its ugly!!! Not what I like
36
« on: December 30, 2014, 02:44:28 pm »
Big space now
38
« on: December 30, 2014, 01:59:29 pm »
Yes, it looks as it should!!! Thanks....
Another thing are the the banner I have at "Overall Header". Is it possible to have it like this, horisontell , and with 4 ads?
Is it possible for the buyer to choose this place and it show up horisontell , and with 4 ads?
/Dan
39
« on: December 30, 2014, 09:01:40 am »
Here it is...
40
« on: December 30, 2014, 05:13:23 am »
Now I'm trying "Overall Header" but it's ugly just under the ads. Have a look at: http://www.guldforum.se//Dan
41
« on: December 29, 2014, 12:22:38 pm »
I use "Board Index Top" to have a list on the top, just under the menu. But they show up one by one instead of a long list like horisontell.
42
« on: December 29, 2014, 12:13:34 pm »
I have the portal as frontpage to the forum. Have a look... http://www.guldforum.se/
43
« on: December 29, 2014, 12:04:21 pm »
Hi
I have Simple Portal installed and I't dosen't show any Ad on the portal.
And under "forum" the SP have a right column and when I use "Board Index Top" it don't count for the column.
Do you have a work around for this problem?
/dan4ever
44
« on: December 09, 2014, 05:26:49 pm »
OK, Thanks!!!!
|
No thumbnails on new uploads
by Tonyvic
Today at 06:26:18 am
|
Display the Contact Page for guests
by SMFHacks
March 27, 2024, 10:55:43 am
|
is it possible to add support for odysee.com
by fvlog19
March 21, 2024, 08:47:51 am
|
Request for admin notification
by davejo
March 10, 2024, 01:31:59 am
|
I need help with torrent upload
by Ineedsmfhelp
March 09, 2024, 10:01:13 pm
|
an idea for new mod (( content type with different display ))
by SMFHacks
February 27, 2024, 01:36:27 pm
|
[Mod] RSS Feed Poster
by SMFHacks
February 27, 2024, 11:57:18 am
|
find duplicate pictures
by fvlog19
February 14, 2024, 02:22:40 pm
|
Error uploading video.
by SMFHacks
February 08, 2024, 02:04:16 pm
|
Gallery icon as last added image
by fvlog19
February 01, 2024, 01:04:56 pm
|
|
|