irishpeck
Jun 3 2009, 04:47 PM
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 CODE <?php
require_once("config.inc.php");
?> <?php if($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&lang=$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 } ?>
Comment/Reply (w/o sign-up)
CopyJosh
Jun 8 2009, 01:30 PM
Looking at your site it looks like you got it now (since this looks like an old post anyway)... I don't know how you solved your problem but a way you can go about it would have been adding a counter and an if statement in your while loop, or, and much more lean (especially if you have a unique id/counter in your database already) would be to drop the counter and use a mod (%). if you need either of these explained in detail still just let me know and I'll be happy to.
Comment/Reply (w/o sign-up)
k_nitin_r
Jun 13 2009, 08:11 AM
Hi! To set the number of the latest posts, you have to type this line into the file just after the require_once statement: $latestads_count = 5; Regarding the images, you've got 2 kinds of images - featured item images and regular images. Do you want both the featured and regular items to appear the same size? Regards, Nitin Reddy
Comment/Reply (w/o sign-up)
Similar Topics
Keywords :
- Ipb Latest Activity Mod
where can i download this from? (14)
Creating A Login Box That Links To My Phpbb Forum
Have my phpBB Forum Intergrated with my Website (4) Can someone please give me a code that I can use to put a login box on my website, that will login a
user into my phpBB Forum? Sort of like Having my phpBB Forum Intergrated with my Website? Thank you
so much if you can! /angel.gif" style="vertical-align:middle" emoid=":angel:" border="0"
alt="angel.gif" /> Ex. ....
How To Display The Latest Forum Post On Main Page
(4) Hey does anyone know how to display the latest forum post on the main page of a website? I'm new
to PHP and have no idea what to do. Thanks in advance!....
Updating Website From Another -- Website
Is it possible, and how? (7) i was just thinking about this project that i'm doing, and i thought that it would be a good
thing that i could update my website let's say on trap17 from my localhost computer with a click
of a mouse, without all of that ftp mambo-yumbo the thing is that i wanted an "UPDATE" button on my
site which woud connect to my localhost and update all the things needed. let's say i added few
profiles localy, and i want to update them on site.. how could it be done. if i was crude in
explanation please write what info u still need and i'll post it back.......
Help With Some Website Coding
Databases and saving form results (4) Hey all, I was looking for some help with creating my new website. I have a form already created,
with some text areas, checkboxes, drop down menu's, ect. I need some help setting up the code to
save the form data once the user clicks "Submit" after filling in their information in the form. I
was hoping to do this 2 ways - 1. Saving the information into some type of database (MySQL I'm
guessing?) and 2. Have the form results emailed to me. I am familiar with the old way of emailing
the results by putting "mailto:email@domain.com" into the form, but new browse....
Question: Securing A Website For Beginners
(1) I don't really understand 'bout it. What kind of security we have to make to hold our web
secure. Only log in features? how bout 'deface' method? how does it work? thx in advance
Please use detailed topic title. ....
Displaying Latest Added Files Of Subdirectories ?
(5) For example,i have a directory , which has 3 sub directories a,b and c...and i have some files in
all subdirectories.. is it possible that i can display the latest added files to any of sub
directory a,b, or c.?i think i will have to use sort by date function but how it should be done that
it compares the files of all the subdirectories directories ?....
How I Can Display Forum Topic On Main Website ?
(4) Suppose i have a website.. domain.com , and have phpbb forums on domain.com/forums.. And i want to
display the new topics written in the forum on the main page of website...how i can do that.. ? for
example ,I want to display this topic `? "domain.com/forums/viewtopic.php?t=16" how can i do that ?....
Sending Messeges Over A Website.
(3) i want to learn how members of a website can send messeges to each other using php since im learning
it. okay i can write in more detail..that for example if users can register on a website , suppose
there are some users on the website , and now i want to learn how they can send messeges to each
other.suppose each user has a unique ID ... and for example if some one has send the messege to
other member of website , then he can know that he has recieved a new messege..something like inbox
on the website where all of his messeges can be stored...lets say same way like on t....
Can My Forum And Website Use The Same Profiles?
(3) I've been programming a 'rate-em' site from scratch. You know like Hot Or Not. YEs,..
yet another rate-em website. Anyway, i'ts done and before I launch it I need to add a forum as
the finishing touch, but all the forum softeware out there seems so hard to integrate. I'm
trying to make it so that when a user logs into my rate-em website they are also logged into 'my
forum'. i.e. i want my forum and web site to use the same profile data. If anyone knows of a
forum program made for this objective please let me know. I'm in over my head, a....
Music Website
(3) http://www.metalmania.net I'm pretty much a novice when it comes to php/mysql and I have been
trying to figure out how to build something similar to the way the site above works. Do any of you
know of a tutorial or script or something that would show me how to accomplish something very
similar to that? I have also been exploring phpnuke platinum with the TopMusic mod, but it just
doesnt want to do what I want it to do. Sure it has a lot of features already done for me, but the
architecture and navigation is very poor in my opinion, not nearly as efficent as the n....
Free Website Portal
(2) hey everyone, have you ever used PHP??? well if you have you know how cool it is and nice to work
with and it has nice mods and stuff for it.... well i got the ultimate php its called
PHP-Platinum very very very nice Portal and Engine Coding, slick sleek and smooth are 3 words for
this portal... if you want to see it in action and see features of it or even download it and check
it out for yourself visit this site PHP-Nuke Platinum Features & Downloads its a very nice
thing to use so go check it out, i love it cause its got nice protection so your site stays s....
Website Help
Need php programmers to help me. (10) I need some php programmers help. I am working on a website. I have asked for some code in another
topic and would now like help. These will possibly be sold. And if they do I am willing to pay the
people who help me out a lot some of it. Dun start asking to help and like help a tiny bit and
expect to get something big out of it. I am only paying to people who help a lot and once they are
sent out. You must also be good with making clan websites. These will be for clans. If you bother me
about getting money than no pay. More info on aim. My aim is generalds2001....
Php Website Assistance?
Help Me (1) Hello, i have just set up a website, and want to protect the site using login and password
protection. Can anyone give me some PHP scripts which will keep a track of usernames and passwords,
and add them to the access rights list. is this possible? If so, i would be much obliged if you
would do so. Thank you. P.S If anyone needs assistance with HTML, that is my speciality, so send
me a message. Always happy to help....
Need Help With My Website
(4) Hello, i have Invision Power Board v3, my website is http://www.generatione.trap17.com/forums] , I
am doing this website for this organization. Anyhow, i still dont have a home page, but i have the
forum part set up. And that is what i need some help on. and i had a couple of questions in which i
was wondering if you guys new how to change these settings. How can i change the title of my
website? The current one is New Directions - Forum (Powered by Invision Power Board). How can i
put more links in for example in trap17 there are , i was wondering how could i ....
Links To Lots Of Usefull Website
I AM NOT SPAMING THIS TOOK ME 15 MINUTES (2) HELLO HERES A LIST OF LOTS OF USEFULL SITES I FOUND: || Codecs || http://www.free-codecs.com
http://www.codecsdownload.com http://www.freecodecs.net http://www.click-now.net
http://www.click-now.org || Search Engines || www.google.com www.search.com www.altalavista.com
www.AllSearchEngines.com www.mamma.com || Programming Help Sites || www.patorjk.com
www.planet-source-code.com www.freevbcode.com www.codearchive.com www.vbaccelerator.com
www.vbcode.com www.abstractvb.com www.developerfusion.com www.codeproject.com www.extreme-vb.net ||
Free Online Game Play || ....
Website Made With Php
help... (31) I want to create and interactive website, similar to ' Free Web Templates ' I do not have
the knowledge to create such a website where users sign up, login, and have profile pages, also
pages displaying their contributions.... If someone could create a base for this website for me,
e.g, login page, mambers page, profile page, creations page and so on... which I can then change the
layout and so on to suit my needs... I can off a small amount of money for this, however, not alot.
Any response is welcome, Thank you, Craig.....
Very Good Php Website
Informations about php editors (10) Just go here: http://www.php-editors.com/ ....
Help About My Website
Need comments and suggestions (7) /biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" /> Hi. I need
your comments and suggestions. Please do visit my website at http://www.karlo.co.nr and tell me
what you think. If you want the source code of my website, just send me a message and I will send it
to you. I'm still a beginner in PHP so please do guide me into the right path of PHP programming
/biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" /> Thanks.
/biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggr....
Debugging Your Php Or Your Website
Very easy and proven steps! (6) First, download Apache 2 (Web Server) from http://www.apache.org Second, download PHP Binaries
from http://www.php.net On the installation of Apache 2, when you are asked for the website
address, just enter 127.0.0.1 That's it, to integrate PHP Binaries to Apache 2, check out the
Apache documentation and the PHP documentation. To access your offline debugging website, go to
your browser, and navigate to 127.0.0.1 or 127.0.0.1:8080....
Looking for Help, With, The, Latest, Ads, Section, Of, Our, Classifieds, Website
|
Searching Video's for Help, With, The, Latest, Ads, Section, Of, Our, Classifieds, Website
See Also,
|
advertisement
|
|