almostbob 866 Retired: passive income ROCKS

edit the table, to add a new column as a date,a nd store the timestamp, not any text representation.as php date() or mysql now()..
a text date is bigger, size matters in the opposite way
a timestamp is faster
a timestamp is easier to select date or time ranges "where date > number and date < number2"
the database is for computers, human readability is a liability, it causes errors, 10/7/11 can be 10 july 2011, 11 july 2010, 7 october 2011,
the information can be simply printed in human readble form on output, using something like cyberspatium's code sample
NOTE:not bagging prior poster;sample is accurate, even customizations to individual user regional preferences, based on this code, so that americans will see 10/7/09 and english will see 7/10/09 on the same day 7 October 2009;

it does not matter when there are ten records in the db, it begins to matter when there are ten thousand records in the db, timeout failures when there are ten million records in the db, unless you optimize the system at the start

anyhow, if you store a text date, how do you simply select between april 1 and august 15 at 3 pm last yeqar

almostbob 866 Retired: passive income ROCKS

<offtopic>taking 8 months to go back to Aus,
avoiding the family as much as possible, :P
bought the kids a house each so they would move out of home, now we have not-so-much to do
a horse stud for a month,
a roo preserve for 3 months, raising wallabies who's mums got hit by cars,
a blokes house who's getting posted overseas for a month
want to go to Coober Pedy and dig, bosslady doesnt think 50degC makes for a nice vacation

amazing how many people you meet, in too many years of service to Queen and Country</offtopic>
the css @media handheld works on lowend devices user_agent detection for pertinent strings works on higher end devices, a mirror filestructure of iconized images, no flash, takes up such a tiny server space, and if your opposition are slower on uptake than you,valuable

almostbob 866 Retired: passive income ROCKS

no fixed dimensions= No px pc cm in, screens are dimensioned in em or %
does not mean NO flash/java/javascript, means the site still functions if flash/java/javascript disabled

very different to plain text files
text reader extensions are part of flash, are easy, but a lot of flash developers dont put them in
given the choice of pass/fail good/bad accessible/non-accessible when both choices are as hard, choose pass
my sites validate,
some include flash elements, but work without flash, they just look prettier with flash enabled.
many clients browse with portable devices, I make money being visible in handheld devices, my larger opposition arent visible,
a lot of money, very little extra effort,
taking 8months holiday starting monday, because I can

almostbob 866 Retired: passive income ROCKS

Also, install as many browsers as possible on your PC and check your pages in all of them. This is where your CSS skills pay dividends - getting an acceptable (not identical - that's almost impossible) look in all modern browsers.

Kudos, damn good idea
I have the portable apps versions, made for thumb drives, no install doesnt take over your own pc, versions of opera safariWin Mozilla, and highly second ardav's thought, multiple browsers makes css checks easy.

almostbob 866 Retired: passive income ROCKS

w3c 'current best practice',
no fixed dimensions, no frames, no tables, so the site works in everything from handheld/phone screens to widescreen desktops
nothing that requires a plugin to function.. does not mean NO flash/java/javascript/etc means that if flash/java/javascript/etc is not installed the site still works
no light text on dark background
alt text, titles on everything
valid (x)html
valid css

almostbob 866 Retired: passive income ROCKS

NO it is not a good idea to separate scripts based on expected location, adds processing, http calls filesystem fetches
the only reason to code anything in any manner is to improve speed-reliability-security.
separate as external files, things that will get reused, css javascripts,
keep as internal to the file, things that are just for that file
There are php scripts made up of multiple external files,(PHPBB example, hundreds of script files) done that way for easy maintainence, improved usablility, upgradability
but somewhere, somehow, the scripts must output html or they do not display, you cant separate html from php completely
function is king, if what you do does not make it function better, dont do it.

almostbob 866 Retired: passive income ROCKS
<dtd with all the doo dah>
<html>
<head>
<!-- bla bla -->
</head>
<body>
<?php /* huge amount of php script, 
perfectly OK,  
user does not see the php, only the output of the script after it is completed */ 
echo '<p>this is visible</p>';
?>
<!-- more html -->
</body>
</html>

user sees

<dtd with all the doo dah>
<html>
<head>
<!-- bla bla -->
</head>
<body>
<p>this is visible</p>
<!-- more html -->
</body>
</html>
almostbob 866 Retired: passive income ROCKS

Please help me how to hide table set of rows from print..??

read the prior posts <tr class='dontprint'> wiping your behind for you incurs extra charge

almostbob 866 Retired: passive income ROCKS

that would likely need to be done in the file that opens in the iframe
something like checking if(self.parent.background='blue') do something wonderful not sure, dont use iframes much, use javascript less, but its an approach

almostbob 866 Retired: passive income ROCKS

nothing clientside is secure,

almostbob 866 Retired: passive income ROCKS
almostbob 866 Retired: passive income ROCKS

when you display a url by folder name, you actually get the index.php,index.html,default.asp page, whatever the default filename the server is set to use
If you do not have an index page in the folder, you get a folder tree
create the index.php file for each folder, that opens the appplication as you wish it to,
urls such as http:/thissite/thisfolder/unusual_name.php fail on this if the user types in http:/thissite/thisfolder/
that way
http:/thissite/thisfolder/
can access
http:/thissite/thisfolder/index.php

hope it helps

urls broken on purpose

almostbob 866 Retired: passive income ROCKS

photoshop is not a web design tool
photoshop is an image tool, and is very good at it
the photoshop layout html and css, is likely in pixels, the dimension of choice for images, alter all the css to %
example:the page you laid out is 1366*768, an irrational size that has no resemblance to window sizes, probably fits dead-on inside Your browser window with menu borders tab bars, but fixed dimension layouts only work in the window they were laid out in
the element <a id='ralph'><img bla bla></a> is 137px*76px in the 1366*768 window
in css #ralph { width:10%;height:10%; } ralph will then be 10% of window width in any window, fluid layouts, scaled in em and %, instead of fixed layouts scaled in px pt in cm, look very simliar in everything from handheld devices to widescreen and wall projection screens.
If photoshop is smart and produced an external css file, then that edit is easy, and need only be done once for the entire site
If photoshop is not smart and produces in<head> styles then the edit can be done once and an external style made from one of the in<head> styles and applied to every page
If photoshop is dumb and produces inline styles, the edit will be tedious, and may be easier to get a different layout tool, but also need only be done once, create an external css file and apply to every page

try …

almostbob 866 Retired: passive income ROCKS

agree with everyone else
start with the tutorials,
dont use frontpage publisher or any other wysiwyg, till after you understand the code a little,
so that you can clean up the code they produce,
the alternative is another ugly, invisible, tiny, fixed-width, layout sitting in the middle of the widescreen monitor, and the rapid departure of your site visitors
good luck
this is a good place to get resources

these standard test beds may assist you http://analyze.websiteoptimization.com/authenticate.php?url=http://www.yoursite.com&/ Speed

http://validator.w3.org/check?uri=http%3A%2F%2Fwww.yoursite.com&charset=%28detect+automatically%29&doctype=Inline&group=0 html

http://jigsaw.w3.org/css-validator/validator?uri=http%3A%2F%2Fwww.yoursite.com&profile=css21&usermedium=all&warning=1&lang=en CSS

http://demo.opera-mini.net/demo.html?www.yoursite.com handheld

http://www.browsershots.org other browsers

many problems (if present) will show serious code errors in the w3c validator sites will produce blankscreens in browsershots


Valid code does not ensure the site will work ...
Invalid code does ensure the site will not work ...
.. in all browser OS combinations

almostbob 866 Retired: passive income ROCKS

again, style the content box in css, as position:fixed; do not, aa, where is the ignore button I'm to old for this

almostbob 866 Retired: passive income ROCKS

in css, fix the content box, instead of the content, the content will inherit the position of the parent box, and stay put, inside the box

almostbob 866 Retired: passive income ROCKS

on apache servers, the following code may help
part of a .htaccess file
mod_rewrite is the relevant section,

RewriteEngine On
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !www.mysite.com [NC]
RewriteCond %{HTTP_REFERER} !mysubdomain.mysite.com/ [NC]
RewriteCond %{HTTP_REFERER} !mysecondsubdomain.mysite.com/ [NC]
RewriteCond %{HTTP_REFERER} !www.someotherpermittedsite.com/ [NC]
RewriteRule \.(jpeg|jpg|gif|bmp|png|wmv|asf)$ - [F,NC]

<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType text/html "access plus 2 days" 
ExpiresByType image/gif "access plus 60 days"
ExpiresByType image/jpg "access plus 60 days"
ExpiresByType image/png "access plus 60 days" 
ExpiresByType application/x-javascript "access plus 60 days"
ExpiresByType text/css "access plus 60 days"
ExpiresByType image/x-icon "access plus 360 days"
</IfModule>

full docs not really sure if the bandwidth theft mod_rewrite rules will help against curl use

almostbob 866 Retired: passive income ROCKS

the obscene words filter has brutalized the url posted
post the code to the page(between code tags) or a link to the page not containing a string that the obscenity filter will edit out

almostbob 866 Retired: passive income ROCKS

a method
for logged in users, the uploaded image url is stored in the db and put into style.css.php on each login from either cookie or session details
of course the first lines of style.css.php look something like

<?php header ('content-type:text/css'); 
ob_start("ob_gzhandler"); ?>/*<style>*/
@media all { .dontall {display:none; } }
@media print { body { line-height:100%; font-size:10.5pt; font-family:verdana, arial, sans-serif; }
.dontprint { display:none; } }
@media screen { .dontshow { display:none; } }
a { text-decoration:none; }
a:hover { background-color:#66cdaa; text-decoration:none; } 
a:focus { background-color:#66cdaa; text-decoration:none;}
a:active { background-color:#66cdaa; text-decoration:none; }
body { background-color:#f6f6f6; body {background-image:url('<?php if(!$_SESSION['bg']) {echo 'paper.png';} else {echo $_SESSION['bg'];} ?>');} color:#000000; font-family:verdana, geneva, arial; margin-left:3%; margin-right:3%;}
/*   bla bla */
<?php ob_flush(); ?>

in the above case, the stylesheet is linked as <link rel="stylesheet" type="text/css" href="http://www.mysite.com/style.css.php"> the gziphandler speeds download of the css file, which is a great candidate for compression the file is large, and contains much repeated strings

almostbob 866 Retired: passive income ROCKS

just one method of many possible methods, if you ask a general question, you get a general answer

almostbob 866 Retired: passive income ROCKS

<a onclick='document.getElementById('aa').data="newfile.swf";' href="#">click</a> maybe?

almostbob 866 Retired: passive income ROCKS

this is the zend article you require http://devzone.zend.com/article/1304, full text searching

almostbob 866 Retired: passive income ROCKS

I do not have access to whatever lightbox is being used,
the code posted by the OP is not complete,

<a onclick="document.body.style.backgroundColor='#707070';return true;" href="indexphp.php?act=generate_quotes" class="style2">Generate</a>

to just change the backgrtond
or

<div id='shadow' style='background:#707070;width:100%;height:2000px;top:0;left:0;right:auto;bottom:auto;z-index:100;display:none;'></div>
<a onclick="document.getElementById('shadow').style.display='block';return true;" href="indexphp.php?act=generate_quotes"

to disable the underlying elements, (set opacity as well as color)
inline styles are tacky but its example only

almostbob 866 Retired: passive income ROCKS

tables are not a layout tool, positioning is much harder with a table than it need be, when css was buggy/useless/not_implemeneted tables were the only option, tables are for displaying tabular data
margin does not place the div so much, as create whitespace around the element
top bottom left right place the element
something like

#resume { top:auto;bottom:auto;left:2%;right:auto;}

locate the resume at its current vertical position 2% of window width from the left border

#resume { top:0;bottom:auto;left:2%;right:auto;position:fixed;}

locate the resume at screen top 2% of window width from the left border and keep it there as other elements scroll around it

#resume { top:auto;bottom:0;left:2%;right:auto;}

locate the resume at window bottom 2% of window width from the left border and have it move with scrolling page
w3schools are not affiliated with W3C, they get some of the more esoteric(1) code details wrong, but are Vgood as a basic tutorial

(1)esoteric=stuff nobody uses anyway

almostbob 866 Retired: passive income ROCKS

No, you are a bit off - and I think you may be trying to get ahead of yourself a bit and that may be adding to the confusion.

When coding with CSS, you will usually have two elements within the body of the HTML page:
The divs (that contain elements)
The elements (usually contained in a div, or just in the body of the HTML)

When an individual element (such as a line of text or a graphic) is given a class or id, it is specific for that item only.

error ID is specific, class is a generic that may have an unlimited number of members

None of the other items will be using that class or id

same error

since nothing else is associated with that item, nor does that item contain or control any items.

When a class or id is applied to an item such as a div or a list (the main list statement - the starting <UL>), then the conditions of that CSS statement will apply to all items WITHIN the affected statement. Once the </div> or the </ul> is reached - that will end the influence of that statement effectively.

misinformation is the most difficult thing to overcome

almostbob 866 Retired: passive income ROCKS

show code, that you are already using, most such changes are a single edit

almostbob 866 Retired: passive income ROCKS

#header a:active {}

almostbob 866 Retired: passive income ROCKS

would suggest correcting the css and not using pixels at all
the current best practice is to use ems and %, 12px on this monitor is less than 2mm high, 12px on the next generation of monitor will be smaller, device generations are ~6 months
fixed size layouts look idiotic on any display other than the one it was laid out on, create scroll bars in part windows, tiny central columns in the middle of widescreen monitors.
this is a 1080 widescreen monitor 4470x2040 connected to my geekmobile laptop1000*600, the site looks stupid in both the laptop display and the widescreen, and like ____ on my blackberry
For any commercial site, where two sites may be compared by potential customers by being placed in half screen windows adjacent to each other, the fixed layout site loses. the customer goes with the site that works
Fixed size layouts fail in handheld devices, technogeeks with the money to waste on incompetent handheld devices also have money to spend on suppliers, not visible, lost customer

these standard test beds may assist you http://analyze.websiteoptimization.com/authenticate.php?url=http://www.yoursite.com&/ Speed tweaks

http://validator.w3.org/check?uri=http%3A%2F%2Fwww.yoursite.com&charset=%28detect+automatically%29&doctype=Inline&group=0 html check

http://jigsaw.w3.org/css-validator/validator?uri=http%3A%2F%2Fwww.yoursite.com&profile=css21&usermedium=all&warning=1&lang=en CSS check

http://demo.opera-mini.net/demo.html?www.yoursite.com handheld

http://www.browsershots.org other browsers

many problems (if present) will show serious code errors in the w3c validator sites will produce blankscreens in browsershots

Valid code does not ensure the site will work ... Invalid code ensures the site will [b]not[/b] work ... .. …

almostbob 866 Retired: passive income ROCKS
$album_num = mysql_num_rows(mysql_query("SELECT * FROM albums WHERE userid='%s'",$id));

mysql_query takes sql syntax, not php syntax.
not a guaranteed solution I dont work much in sql either

almostbob 866 Retired: passive income ROCKS

<link rel="shortcut icon" type="image/x-icon" href="http://www.mysite.com/favicon.ico">

almostbob 866 Retired: passive income ROCKS

.dotnet, Microsoft servers, such a very small %age of clients possible, but many of those clients are large and require large maintainence contracts, because the type of product they are, but the larger they are the more likely they are locked into maintainence agreements, proprietary codebase -more difficult to outsource
java a slightly larger %age of customers

Apache *n?x (Linux Unix PosIx all the possible combinations) php RoR a very much larger %age client base, often of smaller clients who each require smaller amounts of maintainence
large resource availablility, can integrate into finished work

sql, as mssql mysql sqllite PostgreSql needed for all

.dotnet and java alone, unless you are real good, and real lucky, starvation status

Re: Teedoff's post below server use list Aug 2010

Lusiphur commented: What he said :P +1
almostbob 866 Retired: passive income ROCKS

there are also premade scripts http://www.hotscripts.com/category/php/scripts-programs/chat-scripts/
conferencing is only a restricted-access chat
something like visichat configured to only access the single private chatroom named, 'company conference'

almostbob 866 Retired: passive income ROCKS

if the site (as a whole) is not in the www folder then the index.php fole in the www folder need only redirect to the actual folder containing the site
something like

<?php header("Location: /folder/"); 
exit; ?>

first and only code in the index.php residing in www
the file that is accessed when you enter ANY site is
index.html
index.jsp
index.php
index.htm
if you link just to a foldername, you get the default filename within that folder

the file login.php in a subfolder will never be accessed unless you redirect or link to it login.php is not a default filename

<?php header("Location: /folder/login.php"); 
exit; ?>

when you type, either a canonical uri or an ip address, you get the server's default filename in the default folder
every thing else, the site programmer has to DO

could be avoided with a little RTFM, IF the FM werent way worse than VCR instructions, very confusing to R

almostbob 866 Retired: passive income ROCKS

the index file that starts the site has to reside in the html root
it need only be a file containing a single redirect to the other folder

almostbob 866 Retired: passive income ROCKS

You could ask the owner of the site, who's content your are trying to steal, if you have the right to access the code the site owner will email it to you
Its not your code, since what you have posted is not complete,

asking for help to reverse engineer an obfuscation script is incredibly tacky
obfuscation scripts are included to make life more difficult for theives

thats all there is to say about that

almostbob 866 Retired: passive income ROCKS

check how long you retain history for on your pc
somewhere in the internet settings
IF every 24hours the list of visited sites is being reset, then its likely history is only being retained for 24 hours
[tools]
[internet options]

<< has a penchant for the obvious,
the obvious is not noticed when everybody thinks its TOO obvious

almostbob 866 Retired: passive income ROCKS

again by what url are are you attempting to access your pc from outside
the root of the server will be the html folder defined when you set up wamp
local drive structure does not exist,
the drive etc are quarantined, firewalled, protected from external access(unless someone has dome something really stupid with the config)
any more than you can see the drive structure on any other server above the html_root assigned to the site you are accessing,
apache is good at that hardware security
assuming you are accessing your ip address, this example being 24.24.24.24
http://24.24.24.24 will open the index file in the apache root folder, the rest of the drive does not exist
copy/move the developed web pages to that folder, where apache serves from
you cannot access c:\ d:\ only the html_root set in apache server
it is a bad idea to have development folders accessible, any errors in later developer-only versions propogate immediately
if any outside user can access the local drives imagine the damage they could do

almostbob 866 Retired: passive income ROCKS

by what link are you attempting to access the page, from outside
local file structure has no relevance to what is seen from the web
the html root defined in the server is the point of access, any other files must be below that, drive names etc do not exist

almostbob 866 Retired: passive income ROCKS

all the undimensioned width statements will cause compliant browsers to disregard the statement entirely,
current best practice for css layout suggests using ems and % dimensions, relative dimensions that adjust to window size browser resolution and user preference, if those figures given represent pixel vaules, the page will look bad in any browser/screen/window different to the one it was developed on
assuming the .png is set up as a css sprite and the movement is supposed to change the background color, that is outside of current practice as well, and the rest state image is not set
current practice is to use the background: property to change the color, and sprite the image to change the image, particularly when using png format with a transparent background:
the code appears to have a large image with 10 sprites, presumably nav buttons with and without hover backgrounds, but none of the sprites have any color
some browsers may not inherit the background properly from the parent div

#header ul#nav li#but-1{width:64dimension background:url(images/nav.png) offset no-repeat;}
#header ul#nav li#but-2{width:138dimension background:url(images/nav.png) offset no-repeat;}
#header ul#nav li#but-3{width:108dimension background:url(images/nav.png) offset no-repeat;}
#header ul#nav li#but-4{width:97dimension background:url(images/nav.png) offset no-repeat;}
#header ul#nav li#but-5{width:105dimension background:url(images/nav.png) offset no-repeat;}
#header ul#nav li#but-1 a:hover {background:url(images/nav.png) 0px -18px no-repeat;}
#header ul#nav li#but-2 a:hover{background:url(images/nav.png) -64px -18px no-repeat;}
#header ul#nav li#but-3 a:hover{background:url(images/nav.png) -202px -18px no-repeat;}
#header ul#nav li#but-4 a:hover{background:url(images/nav.png) -310px -18px no-repeat;
#header ul#nav li#but-5 a:hover{background:url(images/nav.png) -407px -18px no-repeat;}

examine the color highlighting on the button names, the css parser is severely …

almostbob 866 Retired: passive income ROCKS
echo '&nbsp;<a href="'.$_SERVER['PHP_SELF']."?s=$news&q=$var\">Next 10 &gt;&gt;</a>";

To my mind there are two forms of that code

echo '&nbsp;<a href="'.$_SERVER['PHP_SELF'].'"?s='.$news.'&q='.$var.'">Next 10 &gt;&gt;</a> '; 
echo "&nbsp;<a href='$_SERVER['PHP_SELF']?s=$news&q=$var'>Next 10 &gt;&gt;</a>";

if the variables contain anything unsanitized, the resulting code could fail

almostbob 866 Retired: passive income ROCKS

^how did you know
< thought it was a secret
\/ is looking up < skirt

almostbob 866 Retired: passive income ROCKS

Bluesense is a downloadable wordpress theme, there are thousands of downloadable wordpress themes plugins etc,optimised for different purposes
Bluesense is supposed to be simple search engine friendly and fast,

almostbob 866 Retired: passive income ROCKS

the top and bottom images need to be the actual image you need, to fit in the curves etc, the center image need only be a slice 1 pixel thick through the middle of the image, repeat-y
apologise for inline styles they belong in the stylesheet, included here for expalanation

<body><div class='header' style='whatever'>whatever,</div>
<div class='contenttop' style='height:backgroundtopheight; background:url(backgroundtop.jpg) norepeat; width:100%;'>whatever</div>
<div class='content' style='background:url(backgroundslice.jpg) repeat-y; width:100%;'>whatever</div>
<div class='contentbtm' style='height:backgroundbtmheight; background:url(backgroundbtm.jpg) norepeat; width:100%;'>whatever</div>

its late and this may not be the most logical way to present this info

Lusiphur commented: n/a +1
almostbob 866 Retired: passive income ROCKS

thanks muchly, went googling to find whi it looked wrong,
found the braces and came back, already fixed

almostbob 866 Retired: passive income ROCKS
print "&nbsp;<a href='$_SERVER['PHP_SELF']?s=$prevs&q=$var'>&lt;&lt; Prev 10</a>&nbsp&nbsp;";

php5
unexpected t_variable:: $PHP_SELF does not exist in php5

almostbob 866 Retired: passive income ROCKS

onmouseover javascript is unneccessary
onmouseout javascript is unneccessary
all the inline styles are unneccessary
all the code indenting is unneccesary
add size and download time to the page,

javascripts can be done better with 2 lines of css
preferably in external css file, so you only have to type it ONCE in the entire site

td { background:#CC0000; }
td:hover {background:#F7BF07;}

replaces ALL the mouseover/onmouseout code
css presentation
html content
javascript as little as possible, it takes a lot of code to do a little

inline styles likewise

tables: so its 1980 again?, tables are for tabular data, not layout, there are better ways, maintainence will be extremely tedious on a table site

fixed width, will not work on anybody's display except yours,
small screens / part screen windows, will push offscreen, users do not scroll, user leaves
large screens, a pissant tiny column in the middle of big empty, annoying, user leaves
you have a 948px image in a 214px table cell, that's gonna work reeeeeeaaaal well (NOT), user leaves

current best practice is fluid layouts in ems and %

almostbob 866 Retired: passive income ROCKS

... not implemented in any browser

almostbob 866 Retired: passive income ROCKS

Does this work on external servers? I'm making an app for bebo and using their API all i get is the URL's of the images. Can I use the URL provided in this method?

It would have been nice, intelligent, logical, to include this nugget, gem, of information in the initial post

http://developer.bebo.com/downloads/example-libs-php.php at http://developer.bebo.com/ $bebo->photos_get(); is the part of the API you're interested in,
most file servers are configured to block external access, BUT bebo apps like facebook apps run on the bebo server so should work

almostbob 866 Retired: passive income ROCKS

Its easy if you use a premade gallery script, you dont have to use the script as your script, but it may provide insight to methods to accomplish what you intend <a href='download.php?img=thisimage.jpg'><img src='thisimagethumb.jpg' /></a> download.php

<?php if(!$img) return false;
header("Content-disposition: attachment; filename=$img");
header('Content-type: image/jpeg;');
readfile("$img");
?>

Pisspoor code, but it may provide a starting point

almostbob 866 Retired: passive income ROCKS

dunno what happened, lost the last half

0px is wrong, zero has no dimension,
using 0px (0em 0% 0in 0cm 0pt) will put the browser in quirks mode whuich could cause the issues displayed

0em=0px=0cm=0pt=0in=0%==0
1em<>1px<><>1cm<>1pt<>1in<>1%
zero is a special case