Jump to content
xisto Community

irishpeck

Members
  • Content Count

    11
  • Joined

  • Last visited

About irishpeck

  • Rank
    Newbie [Level 1]
  1. Ok so if you visit http://forums.xisto.com/no_longer_exists/ you will be taken to index.php which calls the file main.php and displays the categories etc in the middle. Well we now have an events page which is the index.php file (renamed to events.php) which calls another file called events1.php to the middle instead of main. Now this events1.php contains the upcoming_events.inc.php file and the calendar of events also which we have but as you can see on the website its not working for me! Please help! Heres the files that you will need. **events1.php** <img src="images/whats-on.png" width="150" height="45" alt="Whats On" /><?phprequire_once("config.inc.php");?><table border="0" cellspacing="0" cellpadding="3" width="98%" class="dir"><tr><table width="525" height="60" border="0"> <tr> <td><?php include("caltest.php"); ?></td> </tr></table><table width="525" height="60" border="0"> <tr> <td><?php include("upcoming_events.inc.php"); ?></td> </tr></table> **calendar.cls.php** <?phpclass calendar{ function display($urlformat, $weekday_start=0, $weekdays="", $months="", $year=0, $month=0, $specialdates="", $cellwidth=20) { // Get year and month if($year && $month) { $day = date("d"); $t = mktime(0, 0, 0, $month, $day, $year); if($year == date("Y") && $month == date("m")) $highlighttoday = TRUE; } else { $year = date("Y"); $month = date("m"); $day = date("d"); $t = time(); $highlighttoday = TRUE; } // Save year and month //setcookie("_xzcal_m", $month); //setcookie("_xzcal_y", $year); // Get weekday and month names if(!$weekdays) { $weekdays = array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"); } if(!$months) { $months = array("January","February","March","April","May","June","July","August","September","October","November","December"); } $weekdays_small = array(); foreach($weekdays as $k=>$wd) { $weekdays_small[$k] = substr($wd, 0, 1); if(ord($weekdays_small[$k]) >= 128) $weekdays_small[$k] .= substr($wd, 1, 1); } // Calendar title $caltitle = $months[$month-1] . " " . $year; // Prev and next month links if ($month == 1) { $prev_month = 12; $prev_month_year = $year-1; } else { $prev_month = $month-1; $prev_month_year = $year; } if ($month == 12) { $next_month = 1; $next_month_year = $year+1; } else { $next_month = $month+1; $next_month_year = $year; } $month_link = "?"; $qsA = $_GET; unset($qsA['_xzcal_m'], $qsA['_xzcal_y']); foreach($qsA as $k=>$v) $month_link .= "$k=$v&"; $prev_month_link = $month_link . "_xzcal_m=$prev_month&_xzcal_y=$prev_month_year"; $next_month_link = $month_link . "_xzcal_m=$next_month&_xzcal_y=$next_month_year"; $cal = <<< EOB <table cellspacing="1" border="0" cellpadding="0" class="calendar"> <tr> <td class="cal_header_month"><a href="$prev_month_link">«</a></td> <td colspan="5" class="cal_header_month">$caltitle</td> <td class="cal_header_month"><a href="$next_month_link">»</a></td> </tr> <tr>EOB; // Weekdays $j = $weekday_start; for ($i=0; $i<7; $i++) { $wds = $weekdays_small[$j]; $cal .= <<< EOB <td class="cal_header_week" width="$cellwidth">$wds</td>EOB; $j++; if ($j==7) $j=0; } $cal .= <<< EOB </tr>EOB; // Days $firstday_weekday = date("w", mktime(0, 0, 0, $month, 1, $year)); $empty_cells = ($firstday_weekday >= $weekday_start) ? ($firstday_weekday - $weekday_start) : 7 - $weekday_start; if ($empty_calls) $cal .= "<tr>"; for ($i=0; $i<$empty_cells; $i++) $cal .= "<td> </td>"; $lastday = date("t", $t); //$datepre = date("Y-m-", $t); $today = date("j", $t); for ($d=1; $d<=$lastday; $d++, $i++) { $url = $urlformat; $url = str_replace("[email="{@T"]{@T[/email]}", mktime(0, 0, 0, $month, $d, $year), $url); $url = str_replace("[email="{@D"]{@D[/email]}", str_pad($d, 2, "0", STR_PAD_LEFT), $url); $url = str_replace("[email="{@M"]{@M[/email]}", $month, $url); $url = str_replace("[email="{@Y"]{@Y[/email]}", $year, $url); $url = str_replace("[email="{@W"]{@W[/email]}", $i, $url); if ($i%7==0) $cal .= "<tr>"; $cal .= "<td"; if ($d == $today && $highlighttoday) $cal .= " id=\"today\""; if ($specialdates[$d]) $cal .= " class=\"content_date\""; $cal .= "><a href=\"$url\">$d</a></td>"; if ($i%7==6) $cal .= "</tr>"; } if ($i%7 != 0) { for(; $i%7!=0; $i++) $cal .= "<td> </td>"; } $cal .= "</tr></table>"; echo $cal; }}?> **caltest.php** <?phpinclude("calendar.cls.php");$url = "[email="page?day={@D"]page?day={@D[/email]}";calendar::display($url, 0);?>
  2. We are looking for some feedback (good and bad) for our new classifieds website. Its called http://forums.xisto.com/no_longer_exists/ and we would really like some help with ideas and feedback etc. You can email your feedback to flogitireland@yahoo.ie or just reply to this post with your feedback. Thanks so much in advance! Also if you would like to post anything on the website it will be Free of charge for a limited time only and you will also be entered into a draw to win a 40inch HD Television!
  3. Hey we have decided to just put the latest ads section at the top so can you help me with two things? One could you help me edit the script so only 5 show up and then the next 5 go to the next line and Two could you help me could you help us keep all the pictures the same size? Basically the images are being sized using a config.inc.php but its not working right because they are different sizes. Sorry for all these problems and once again i cant thank you enough for all this work <?phprequire_once("config.inc.php");?><?phpif($latestads_count){?><?php $sql = "SELECT a.*, ct.cityname, UNIX_TIMESTAMP(a.createdon) AS timestamp, feat.adid AS isfeat, COUNT(*) AS piccount, p.picfile AS picfile, scat.subcatname, scat.catid, cat.catname FROM $t_ads a INNER JOIN $t_cities ct ON a.cityid = ct.cityid INNER JOIN $t_subcats scat ON a.subcatid = scat.subcatid INNER JOIN $t_cats cat ON scat.catid = cat.catid LEFT OUTER JOIN $t_featured feat ON a.adid = feat.adid AND feat.adtype = 'A' AND feat.featuredtill >= NOW() LEFT OUTER JOIN $t_adpics p ON a.adid = p.adid AND p.isevent = '0' WHERE $visibility_condn $loc_condn GROUP BY a.adid ORDER BY a.createdon DESC LIMIT $latestads_count"; $res_latest = mysql_query($sql) or die($sql.mysql_error()); $css_first = "_first"; while($row = mysql_fetch_array($res_latest)) { $catname_inurl = RemoveBadURLChars($row['catname']); $subcatname_inurl = RemoveBadURLChars($row['subcatname']); if($sef_urls) $url = "{$vbasedir}$xcityid/posts/{$row[catid]}_{$catname_inurl}/{$row[subcatid]}_{$subcatname_inurl}/$row[adid]_" . RemoveBadURLChars($row['adtitle']) . ".html"; else $url = "?view=showad&adid=$row[adid]&cityid=$xcityid〈=$xlang{$link_extra}";?> <?php if($row['isfeat']) { //$feat_class = "class=\"featured\""; $feat_img = "<img src=\"images/featured.gif\" align=\"absmiddle\">"; } else { //$feat_class = ""; $feat_img = ""; } if($row['picfile']) { $picfile = $row['picfile']; $imgsize = GetThumbnailSize("{$datadir[adpics]}/{$picfile}", $tinythumb_max_width, $tinythumb_max_height); } else { $picfile = ""; } ?> <?php if($picfile) { ?> <a href="<?php echo $url; ?>"><img src="<?php echo "{$datadir[adpics]}/{$picfile}"; ?>" border="0" width="<?php echo $imgsize[0]; ?>" height="<?php echo $imgsize[1]; ?>" style="border:1px solid black"></a> <?php } ?> <?php $css_first = ""; }?></div><?php}?>
  4. Your ok i actually got this fixed now thanks though im stuck on something else now. Il post it here in 2 min im just going to try something first
  5. Well ive got the subcategories part fixed and it now displays the A-Z instead so thats grand but i still need help with the others. I want the latest ads section (you can see it at the end of the page) with this we want to only display the thumbnails of the 10 latest ads and then this script will be placed within the recent ads box at the top of the page. Thanks so much <?phprequire_once("config.inc.php");?><?phpif($latestads_count){?><div class="latestads"><div class="head"><?php echo $lang['LATEST_ADS']; ?></div><table border="0" cellspacing="0" cellpadding="0" class="adlisting" width="100%"><?php $sql = "SELECT a.*, ct.cityname, UNIX_TIMESTAMP(a.createdon) AS timestamp, feat.adid AS isfeat, COUNT(*) AS piccount, p.picfile AS picfile, scat.subcatname, scat.catid, cat.catname FROM $t_ads a INNER JOIN $t_cities ct ON a.cityid = ct.cityid INNER JOIN $t_subcats scat ON a.subcatid = scat.subcatid INNER JOIN $t_cats cat ON scat.catid = cat.catid LEFT OUTER JOIN $t_featured feat ON a.adid = feat.adid AND feat.adtype = 'A' AND feat.featuredtill >= NOW() LEFT OUTER JOIN $t_adpics p ON a.adid = p.adid AND p.isevent = '0' WHERE $visibility_condn $loc_condn GROUP BY a.adid ORDER BY a.createdon DESC LIMIT $latestads_count"; $res_latest = mysql_query($sql) or die($sql.mysql_error()); $css_first = "_first"; while($row = mysql_fetch_array($res_latest)) { $catname_inurl = RemoveBadURLChars($row['catname']); $subcatname_inurl = RemoveBadURLChars($row['subcatname']); if($sef_urls) $url = "{$vbasedir}$xcityid/posts/{$row[catid]}_{$catname_inurl}/{$row[subcatid]}_{$subcatname_inurl}/$row[adid]_" . RemoveBadURLChars($row['adtitle']) . ".html"; else $url = "?view=showad&adid=$row[adid]&cityid=$xcityid〈=$xlang{$link_extra}";?> <?php if($row['isfeat']) { //$feat_class = "class=\"featured\""; $feat_img = "<img src=\"images/featured.gif\" align=\"absmiddle\">"; } else { //$feat_class = ""; $feat_img = ""; } if($row['picfile']) { $picfile = $row['picfile']; $imgsize = GetThumbnailSize("{$datadir[adpics]}/{$picfile}", $tinythumb_max_width, $tinythumb_max_height); } else { $picfile = ""; } ?> <tr> <td width="15"> <img src="images/bullet.gif" align="absmiddle"> </td> <td> <b><a href="<?php echo $url; ?>" <?php echo $feat_class; ?>><?php echo $row['adtitle']; ?></a></b> <?php if(0&&$row['picfile']) { ?><img src="images/adwithpic.gif" align="absmiddle"><?php } ?> <?php echo $feat_img; ?><br> <span class="adcat"> <?php echo "$row[catname] $path_sep $row[subcatname]"; ?> <?php $loc = ""; if($row['area']) $loc = $row['area']; if($xcityid < 0) $loc .= ($loc ? ", " : "") . $row['cityname']; if($loc) echo "<br>$loc"; ?> </span> </td> <td align="right" width="<?php echo $tinythumb_max_width; ?>"> <?php if($picfile) { ?> <a href="<?php echo $url; ?>"><img src="<?php echo "{$datadir[adpics]}/{$picfile}"; ?>" border="0" width="<?php echo $imgsize[0]; ?>" height="<?php echo $imgsize[1]; ?>" style="border:1px solid black"></a> <?php } ?> </td> </tr><?php $css_first = ""; }?></table></div><?php}?> That is the php code to display the latest ads on the homepage at the bottom. If there is any other code you require please dont hesitate to ask.
  6. If i post a sample of the code will you be able to show me where to insert it? and where i could insert the code in order to make the link?
  7. I really need help with some php code for a new website. If you visit http://forums.xisto.com/no_longer_exists/ you will see all the categories in the middle and below it all the subcategories i was wondering if anyone could help me cut the subcategories down so that theres only 4 with a link below it that then links to a page ive created with all the subcategories listed. If you visit https://www.appliancesdelivered.ie/ you will see exactly what im talking about. Thanks so much in advance.
  8. Hello i contacted the server ok and this is the response i recieved from them "The site is not an existing CMS installation or component, it is a PHP driven script which stands alone, there are, however, elements in the PHP that have been assimilated from Joomla. Is there anything we may be able to help you with?" Can you still help me out with these? Thank you so much for all your help so far
  9. I dont know what cms it is, yeah its my website im currently developing it and need help with lots of bits of code. What would be the easiest thing and where could i start. If you could help me i can send you whatever files you need!!
  10. If you visit http://forums.xisto.com/no_longer_exists/ you will see that all the images which are links have a black border around it. But when i change this to the same colour as the background colour it changes all the links in the middle of the page for the categories. How can i take the border off the images and keep the category links the same colour as they are? The css file is below in full. body { font-family: Verdana; font-size: 11px; margin: 0px; padding: 0px;}td { font-size: 11px;}h1 { font-size: 16pt; margin: 0px;}h2 { font-size: 14px; font-weight: bold; margin-top: 0px; padding-top: 0px; margin-bottom: 10px;}h3 { font-size: 12px; font-weight: bold; margin-top: 0px; padding-top: 0px; margin-bottom: 10px;}th { font-size: 12px; text-align: left;}form { margin: 0px;}input, textarea, select, optgroup, option { font-family: Verdana, sans-serif; font-size: 10px;}button { font-family: Verdana, sans-serif; font-size: 10px; font-weight: bold; text-transform: uppercase; background-color: #000; color: white;}pre { font-family: "Courier New"; font-size: 12px; text-align: left;}.err { color: red; font-weight: bold; margin-bottom: 5px;}.imp { color: #CC3300; font-weight: bold; margin-bottom: 5px;}.msg { color: green; margin-bottom: 5px;}.marker { color: red; font-weight: bold;}.hint { font-size: 10px; font-style: italic; color: gray;}#header { padding: 10px;}#logo { font-size: 14px; font-weight: bold;}#logo a { color: black; text-decoration: none;}#logo a:hover { color: #DF971E; text-decoration: none;}#today { font-size: 10px;}#nav { text-align: right;}#city { font-weight: bold; font-size: 14px; display: block;}#sidebar_left { padding-top: 10px; background-color: #FF6; /*#F0F4FB*/}.buttons td { text-align: center; background-color: #FF6;}.buttons a { display: block; font-weight: bold; text-transform: uppercase; color: white; padding: 3px;}#sidebar_left .head { font-size: 10px; font-weight: bold; text-transform: uppercase; color: #003366;}#sidebar_left table.linkbox { margin-bottom: 15px;}#sidebar_left table.linkbox a { display: block; text-align: center; padding: 3px; border-bottom: 1px solid #DDDDDD;}table.sidebox { margin-bottom: 10px;}table.sidebox td { text-align: left;}#contentcell { }#content { padding: 10px;}#path { background-color: #FF6; font-size: 16px; margin-bottom: 5px;}#path td { padding: 5px 5px 5px 10px;}#path a { color: #777777; text-decoration: none;}#path a:hover { color: black; text-decoration: underline;}table.searchbox { background-color: #FF6; border: 1px solid #DDDDDD; margin-bottom: 20px;}table.searchbox td { padding: 10px;}.eventnav { border-bottom: 1px solid #DDDDDD; margin-bottom: 10px;}table.dir {}table.dir_cat { }table.dir_cat th { font-size: 14px; font-weight: bold; text-align: left; text-transform: none; margin: 0px; padding-bottom: 5px;}table.dir_cat td {}table.dir_cat .count { color: #999999; font-size: 10px;}table.dir_cat th .count { color: gray; font-size: 10px;}table.adlisting {}table.adlisting tr.ad1 { background-color: #FF6 /*#FAFAFA;*/}table.adlisting tr.ad2 {}table.adlisting td { padding: 4px;}table.adlisting td.head, table.adlisting tr.head td { font-weight: bold; background-color: #FF6; }table.adlisting td.datehead { background-color: #FF6; /*border-bottom: 1px solid #CCCCCC;*/ font-weight: bold; border-bottom: 0px;}table.adlisting td.icon {}table.adlisting td.icon img {}table.adlisting .adtitle { font-weight: bold;}table.adlisting .date { font-style: italic;}table.adlisting .ad1 {}table.adlisting .ad2 { background-color: #FF6 /*#FAFAFA;*/}.adheader { margin-bottom: 10px; padding-bottom: 5px; border-bottom: 1px solid #E0E0E0;}.adheader .icon { /*vertical-align: top;*/}.adheader .adtitle { font-size: 14px; font-weight: bold; margin-top: 0px; padding-top: 0px; margin-bottom: 0px; padding-bottom: 0px;}.adheader .adarea { font-size: 11px; font-weight: normal;}.ad { margin-bottom: 10px;}.ad .link_marker { color: darkorange; font-weight: bold;}.disclosures { padding: 5px;}.disclosure_yes { color: green;}.disclosure_no { color: red;}.disclosures b {}.adpics { margin-bottom: 10px; /*border-bottom: 1px solid #DDDDDD;*/}.adpics img { border: 1px solid black; /*padding: 10px; background-color: #FAFAFA;*/}.imglisting {}.imgitem { margin-bottom: 30px;}.imgitem .head { font-size: 12px; font-weight: bold;}.imgitem img.img { margin-top: 5px; border: 1px solid black;}.imgitem .caption {}.imgitem .poster { font-weight: bold;}.imgitem .time { font-weight: bold;}.imgitem .desc { margin-top: 5px;}.linkbox2 { background-color: #FF6; font-weight: bold; text-transform: uppercase; padding: 5px; text-align: center; color: white;}.linkbox2 a { display: block; color: white;}.linkbox2 a:hover { color: white; text-align: center;}.imagecredits { padding: 5px;}.head { font-weight: bold;}.imagecredits a {}.imagecredits .count { color: #BBBBBB; font-size: 10px;}.comments {}.comments .head { font-size: 12px; font-weight: bold;}.commentitem { margin-bottom: 10px;}.commentitem .poster { font-weight: bold; display: block;}.commentitem .time { color: gray; display: block;}.commentitem .comments { display: block;}#sidebar_right_cities { background-color: #FF6; padding: 0px 5px 5px 5px;}#sidebar_right { padding: 5px 5px 5px 5px;}#sidebar_right a {}.citylist_country { display: block; color: black; font-weight: bold; text-transform: uppercase; font-size: 10px; margin-top: 2px;}.citylist_city { color: #777777; font-size: 10px;}#footer { color: #A0A0A0;}#footer td { font-size: 9px; padding-left: 15px; padding-top: 10px;}table.postad {}img.thumb { border: 1px solid black;}.postpath { padding: 5px; border: 1px solid #DBC06F; background-color: #F7F0DD; font-size: 12px; color: brown; margin-bottom: 10px;}.postpath b { color: black;}.postpath a { font-weight: bold; color: #003399; font-size: 11px;}#search_top { margin-bottom: 20px; padding: 10px; background-color: #FAFAFA; border: 1px solid #EAEAEA;}.invoice { background-color: #F0F0F0; border-right: 1px solid #EAEAEA; border-top: 1px solid #EAEAEA;}.invoice td { background-color: white; padding: 5px; border-left: 1px solid #EAEAEA; border-bottom: 1px solid #EAEAEA;}.invoice .empty { background-color: white; border: 1px solid white;}.invoice .firstcell { font-weight: bold;}.invoice .maincell { /*background-color: #FAFAFA;*/ text-align: right;}.invoice .totalrow td { background-color: #FAFAFA;}.invoice .totalrow .totalcell { background-color: #F3F3F3; font-size: 13px; font-weight: bold; text-align: right;}.featuredad_first, .featuredad_first td { background-color: #FFEEC6; border-top: 1px solid #FFDF95; border-bottom: 1px solid #FFDF95; padding: 5px 5px 2px 5px; margin-bottom: 10px;}.featuredad, .featuredad td { background-color: #FFEEC6; border-bottom: 1px solid #FFDF95; padding: 5px 5px 2px 5px; margin-bottom: 10px;}.featuredad a, .featuredad_first a { font-weight: bold;}.post_note { color: green;}.latestads { padding-top: 10px; margin-bottom: 10px;}.latestads .head { padding-bottom: 5px; color: steelblue; font-size: 12px;}.latestads td { border-top: 1px solid #F0F0F0;}.adcat { font-size: 9px; color: #444444; /*text-decoration: underline;*/}table.latestads_table td { padding: 1px;}table.latestads_table a.featured { font-weight: bold;;}.catlist .cat { padding: 1px; display: block;}.catlist .cat a { font-weight: bold;}.catlist .subcat { padding: 1px; display: block;}.catlist .count { color: gray;}.adpreview { display: block; font-size: 10px; color: gray;}
  11. Ok i am currently helping to setup a new website called Flog-It (its a new classified website). I have a few things i need help with. 1. I need to put the latest ads section which is located at the end of the page in the recent ads box at the top. But the text which is associated with the ad needs to be removed so only the image is displayed with a link to the ad. This can be seen on the homepage of https://www.donedeal.ie/. 2. I need the subcategories to be shortened to 4 or 5 subcategories with a link below it which expands that category into all of its subcategories. An example of this can be seen at https://www.appliancesdelivered.ie/. I would also like this to be an ajax style slide function instead of going to a new webpage although i dont mind if it does. 3. This website allows people to upload images with their ad. I want to be able to add our own dynamic watermark to each image uploaded if its possible. I have all the necessary php pages and would like someone to help me with these codes as i have limited php knowledge. Thanks so much in advance. You can email me on sakura-designs@hotmail.com also.
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.