<? DEW-CODE.COM  

Downloads

Assorted scripts  (1)
DewNewPHPLinks  (9)





Lost Password?
No account yet? Register

Dew-Code Newsfeed

Resources


 USdigitalcable.com

Dew-Code
Welcome, Guest
Please Login or Register.    Lost Password?
Re:Thumbshots alternative (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: Re:Thumbshots alternative
#1057
IceMan (User)
Fresh Boarder
Posts: 9
graphgraph
User Offline Click here to see the profile of this user
Re:Thumbshots alternative 2 Years, 8 Months ago Karma: 0  
Good Evening Dewed
Ok im getting closer now.....just a couple of things im stuck with tonight:

When I perform a search the results page has flags next to them instead of the thumbnails.....how do i get it to show the thumbnails as in the directory results please ?

I want to set the whole site at 1000px width and centered on the page, is there one place to <center></center> the whole thing or are there multiple places to alter as I can get most of it to center but not the actual links results content?

Once again many thanks in advance for your help

IceMan

p.s. incase your wondering i am setting the code up to run as a content mangement system with full insite search facility not bad so far for a novice Not what it was intended for I know but I was laying awake one night unable to sleep and it hit me like a flash of lightening lol !!!
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#1059
Dewed (Admin)
Admin
Posts: 605
graph
User Online Now Click here to see the profile of this user
Dew-Code.com
Re:Thumbshots alternative 2 Years, 8 Months ago Karma: 9  
Search results are generated by a 2nd entry similar to the draw_sites function you've been editing, the draw_search_sites function starts around line # 1347 The IMG tag for the flags are created around line 1402

Code:

$htmlsrc .= "<img border=\"1\" src=\"./images/flags/" . $sites_array[country] . "\""; $htmlsrc .= "hspace=\"5\" alt=\""; $short_entry = eregi_replace(".gif", "", $sites_array[country]); $short_entry = eregi_replace("_", " ", $short_entry); $htmlsrc .= $short_entry . "\" title=\"" . $short_entry . "\">";
Sticking with the example I previsouly posted, replace that with this ...
Code:

$htmlsrc .= "<img border=\"0\" src=\"/sitepics/".$sites_array["site_id"] .".jpg\">";
 
Report to moderator   Logged Logged  
 
Nothing to it but to Dew it !
Dew-Code.com
  The administrator has disabled public write access.
#1061
Dewed (Admin)
Admin
Posts: 605
graph
User Online Now Click here to see the profile of this user
Dew-Code.com
Re:Thumbshots alternative 2 Years, 8 Months ago Karma: 9  
The fixed width portion of your question... Keep in mind the core of this program was written in 1999, and abandoned. Some one else branched that code off, and I created a branch of that. CSS, aka stylesheets weren't as widely used then, and while this script did use them, their use was primarily limited to colors, not placement and layout.

So... a couple of different approaches might be needed. The simplest is to just add something like this to the top of the stylesheet for your chosen theme.

Code:

body { padding-left: 100px; padding-right: 100px;
Another approach would be to hard code the width in the "table" function located in /themes/X/tables.php where X is the name of the theme you are using. Around line #54 find
Code:

$html = "\r\n<!-- Start New Table -->\r\n"; $html .= "<table border=\"0\" cellspacing=\"2\" cellpadding=\"0\" "; $html .= "width=\"" . $width . "\" align=\"" . $align . "\">";
You could hard code a width like this
Code:

$html .= "width=\"1000\" align=\"" . $align . "\">";
Possibly a combination of approaches might be necessary. You could also try adding width:1000px; to the body part of the CSS , and/or use percentages for the padding values.
Code:

body { padding-left:10%; padding-right:10%; width:1000px;
 
Report to moderator   Logged Logged  
 
Last Edit: 2009/08/23 15:25 By Dewed.
 
Nothing to it but to Dew it !
Dew-Code.com
  The administrator has disabled public write access.
#1100
IceMan (User)
Fresh Boarder
Posts: 9
graphgraph
User Offline Click here to see the profile of this user
Re:Thumbshots alternative 2 Years, 8 Months ago Karma: 0  
Hi Dewed
Getting very close to finishing now
When I do a search the results bring up the image i want just like the main listing results instead of the flag now as required.
The problem im having now is that the text for the site name and description is coming up level with the bottom of the image instead of the top of the image as in the normal directory listings.

As always any help is appreciated

Mickey
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#1101
Dewed (Admin)
Admin
Posts: 605
graph
User Online Now Click here to see the profile of this user
Dew-Code.com
Re:Thumbshots alternative 2 Years, 8 Months ago Karma: 9  
Hrm.. Couple of ways to address that problem..

<IMG tags take an align directive, ...

<img src=/pathtofile.jpg align=center border=0>Lots & lots of text


The align value can be top,bottom, middle and I think absmiddle It affects how text following an image will align with the image but, doesn't always work well when the text following the image needs to line wrap, if that makes sense.

Another way to possibly fix it, is to wrap the image in a div, and apply some style to that div. This *usually* avoids the issue when images are followed by long lines of text that are likely to be wrapped by the browser.

<div style="float:left; margin:8px;">
<img src=/pathtofile.jpg border=0>
</div>Lots & lots of text
 
Report to moderator   Logged Logged  
 
Nothing to it but to Dew it !
Dew-Code.com
  The administrator has disabled public write access.
#1102
IceMan (User)
Fresh Boarder
Posts: 9
graphgraph
User Offline Click here to see the profile of this user
Re:Thumbshots alternative 2 Years, 8 Months ago Karma: 0  
Cant get either of them to work...maybe im not adding the <div correctly
Code:

if (!isset($RIP)) { $RIP = $sites_array[cat_id];} $cell_color = "BgTable1"; $j % 2 ? 0: $cell_color = "BgTable2"; $htmlsrc .= $main_table . "<tr>\r\n\t<td class=\"" . $cell_color . "\">"; $htmlsrc .= "<img border=\"0\" src=\"/thumbs/".$sites_array["site_id"] .".jpg\">"; $htmlsrc .= "<a class=\"siteName\" href=\"out"; if($user_outer_frame == "Y"){$htmlsrc .= "_frame";} $htmlsrc .= ".php?";
This is the code i changed to get the right image but cant work out how to get it align properly Mickey
 
Report to moderator   Logged Logged  
 
Last Edit: 2009/09/02 06:49 By IceMan.
  The administrator has disabled public write access.
Go to top Post Reply
get the latest posts directly to your desktop
Outsource your projects to thousands of programmers at
ScriptLance.com
Newsflash
Interested in
advertising?

This space for rent!

Sign up for PayPal and start accepting credit card payments instantly.
Copyright Dew-Code 2008