Jump to content

DarkxPunk

Members
  • Posts

    465
  • Joined

  • Last visited

Posts posted by DarkxPunk

  1. Hey everyone,

     

    Please correct me if I should not be posting these sort of issues, I notice most posts are related to syntax. Anyway lets get started.

     

    I have a fairly large database (approximately 65000 rows with 10 columns), it has been provided to me in a CSV format. At first I attempted to upload this database and kept having MySQL disappear (gone), I figured later that was related to my max packet size was too low, resolved that. Now I attempted to import it again, but I am always missing about 20/30 thousand rows (not in any particular location either), one instance I actually incurred an extra 60 thousand rows (which does not make sense so it must have been duplicating data). I am at this point where I am completely lost as to why this won't upload. In the past I have uploaded CSV files with maybe 6/7 columns and 1000/2000 rows, and never had or have issues, I know it is dramatically smaller in comparison, but I don't understand why MySQL can't handle it.

     

    Thanks for any help anyone can provide.

  2. You'll have to show all your code, or at least the parts where $pageTitle is being printed. Make sure that the order and scope are correct.

     

    It was order… I got confused because I tried putting:

     

    $pageTitle = $illustration["cinematic"]["full_name"];

    echo $pageTitle;

     

    at the end, but there was still no result. This time I placed it after my preloaded php code and before the head loaded (rather than before both) and it functions. I should have clued into that before. Thanks for the nudge :)

  3. Because you are only assigning $illustration["cinematic"]["full_name"] to $pageTitle variable, if you were to echo $pageTitle you should get same result as echo $illustration["cinematic"]["full_name"];

    That's the thing, I have it echoing in the title of the head of the page. I even tried for the ###### of it to echo again within the body. It comes up blank.

    What does this do?

    $pageTitle = $illustration["cinematic"]["full_name"];echo "[". $illustration["cinematic"]["full_name"] ."] [". $pageTitle ."]";
    I am totally confused...
  4. So I got this code:

     

    $pageTitle = $illustration["cinematic"]["full_name"];
    For some reason it is not showing the proper content
    However if I do this:
    echo $illustration["cinematic"]["full_name"];
    it gives me the result...
    What am I doing wrong?
  5. Hello everyone!

     

    The following is my first attempt at managing a cookie. I am simply looking for what you think of it, and how you think I can improve. I made this with a tutorial online and made the buttons myself.

     

     

     

    <!DOCTYPE html><html>	<head>		<title></title>	</head>		<body>			<script>function Get_Cookie( check_name ) {	// first we'll split this cookie up into name/value pairs	// note: document.cookie only returns name=value, not the other components	var a_all_cookies = document.cookie.split( ';' );	var a_temp_cookie = '';	var cookie_name = '';	var cookie_value = '';	var b_cookie_found = false; // set boolean t/f default f	var i = '';		for ( i = 0; i < a_all_cookies.length; i++ )	{		// now we'll split apart each name=value pair		a_temp_cookie = a_all_cookies[i].split( '=' );						// and trim left/right whitespace while we're at it		cookie_name = a_temp_cookie[0].replace(/^s+|s+$/g, '');			// if the extracted name matches passed check_name		if ( cookie_name == check_name )		{			b_cookie_found = true;			// we need to handle case where cookie has no value but exists (no = sign, that is):			if ( a_temp_cookie.length > 1 )			{				cookie_value = unescape( a_temp_cookie[1].replace(/^s+|s+$/g, '') );			}			// note that in cases where cookie is initialized but no value, null is returned			return cookie_value;			break;		}		a_temp_cookie = null;		cookie_name = '';	}	if ( !b_cookie_found ) 	{		return null;	}}/*only the first 2 parameters are required, the cookie name, the cookievalue. Cookie time is in milliseconds, so the below expires will make the number you pass in the Set_Cookie function call the number of days the cookielasts, if you want it to be hours or minutes, just get rid of 24 and 60.Generally you don't need to worry about domain, path or secure for most applicationsso unless you need that, leave those parameters blank in the function call.*/function Set_Cookie( name, value, expires, path, domain, secure ) {	// set time, it's in milliseconds	var today = new Date();	today.setTime( today.getTime() );	// if the expires variable is set, make the correct expires time, the	// current script below will set it for x number of days, to make it	// for hours, delete * 24, for minutes, delete * 60 * 24	if ( expires )	{		expires = expires * 1000 * 60 * 60 * 24;	}	//alert( 'today ' + today.toGMTString() );// this is for testing purpose only	var expires_date = new Date( today.getTime() + (expires) );	//alert('expires ' + expires_date.toGMTString());// this is for testing purposes only	document.cookie = name + "=" +escape( value ) +		( ( expires ) ? ";expires=" + expires_date.toGMTString() : "" ) + //expires.toGMTString()		( ( path ) ? ";path=" + path : "" ) + 		( ( domain ) ? ";domain=" + domain : "" ) +		( ( secure ) ? ";secure" : "" );}// this deletes the cookie when calledfunction Delete_Cookie( name, path, domain ) {	if ( Get_Cookie( name ) ) document.cookie = name + "=" +			( ( path ) ? ";path=" + path : "") +			( ( domain ) ? ";domain=" + domain : "" ) +			";expires=Thu, 01-Jan-1970 00:00:01 GMT";}	var cookieName = 'test';	var cookieValue = 'The cookie was given!';	var cookieExpires = '365';	var cookiePath = '/';	var cookieDomain = '';	var cookieSecure = '';function setCookie() {	if ( Get_Cookie( 'test' ) !== cookieValue ) {			if (confirm('We are going to give you a cookie!')) {				Set_Cookie( cookieName, cookieValue, cookieExpires, cookiePath, cookieDomain, cookieSecure );				alert( Get_Cookie('test') );			}			else {				alert( 'You don'+"'"+'t want a cookie?' );			}	}	else {		alert( 'We were going to offer you a cookie, nbut you already have one.' );	}}function checkCookie() {		if ( Get_Cookie( 'test' ) == cookieValue ) {		alert('You do have a cookie! nThis is what we said when we gave it to you: n"'+cookieValue+'"');	}	else {		alert('The cookie is a lie!');	}	}function deleteCookie() {if ( Get_Cookie( 'test' ) == cookieValue ) {alert("There is a cookie to eat.");Delete_Cookie('test', '/', '');( Get_Cookie( 'test' ) ) ? alert( Get_Cookie('test')) : alert( 'We have eaten the cookie.');}else {	alert("There is no cookie for us to eat!");}	}			</script>			<a onclick="setCookie();">Take Cookie</a>			<br/>			<br/>			<a onclick="checkCookie();">Check Cookie</a>			<br/>			<br/>			<a onclick="deleteCookie();">Eat Cookie</a>	</body></html> 

     

     

     

    Thanks for any help!

  6. Span should be used within a block element such as P, just use div, i don't think SEO matters about P or span tags, it just looks at content to retrieve, again! relevant info related to keywords, The p, span are just for layout purposes and to make page more readable to users.

    Text without an associated wrapping tag... I feel dirty. Thanks for the info.
  7. DO NOT USE H1 for logo, the h1 tag is one of the most important tags SEO looks at to retrieve info about site, it used to give main title to page and usually would contain keyword relating to that specific page, using for logo it becomes static and obsolete for SEO purposes, and no you can't just use another H1 tag, as only one should be used per page.

    So should I use span then?
  8. Yeah, that is the way I have been doing it… I just feel weird using h1 when its not exactly a title of a specific body of text… Is there any SEO benefit to using h1 over span in this case?

  9. Hi everyone...

     

    So I have been wondering what is the best way to wrap some text. From my understanding the usage for each tag is the following:

     

    <p> = Paragraphs / Blocks of text

     

    <h1> - <h6> = Headers for blocks of text

     

    <span> = To style specific text within either a <p> or <h1> - <h6>

     

    Now my situation is this… I am attempting to do a logo with its logo type using text rather than an image, the problem is I don't know which tag fits… It it defiantly not a paragraph or block of text, it is kinda a header, but it's not for any specific block of text, and I am also not styling specific text within either of the first two tags… So yeah, I am not sure what to use. In my head <span> is the correct one to use as it does not apply any specific styling allowing me to style as needed, while <p> and <h1> - <h6> have already some predefined styles. What also matters is SEO, will using a <span> make the seo invalid?

     

    Thanks for any input.

  10. ... Yeah that's part of the beauty, and that type of information is obtainable if you need screen side via EMCAScript.

    *squint in confusion* I wanna center this with as little over head as possible. I know nothing of emcascript, but that sounds like extra over head when all I wanna do is optimise my design...
  11. Try section and id, make it relative and place it where you want

    <body>		<header>			<div id="logoWrap">				<img class="logogram" src="images/logo.png" width="77px" height="50px" alt="Sunburst Rare Diamonds Incorporated Logo"/>				<div id="logotype">					<h1>Sunburst Rare Diamonds</h1>					<h2>INCORPORATED</h2>				</div>			</div>			<a class="tollFree">1-844-RAREGEM</a>		</header>              <section id= "menu">		<p>Text 1</p>		<p>Text 2</p>            </section>	</body></html>
    I am using divs... I just styled the elements using display table/table-cell. The only issue I see with absolute positioning is you need to know the exact dimensions of the box, which I don't want...
  12. Okay so… I found what is causing it… The background image having the following properties:

     

    img.bg {
    position: fixed;
    z-index: -999;
    }
    How the H E DOUBLE HOCKEY STICKS does this effect the thickness of the text? I have tested it through and through and it is the cause… HOW??? I am so blood confused...
    You can test it by simply removing the img from the main site… It thickens… You put it back, it thins out. If you go deeper and just remove either the z-index or the position fixed it thickens… What?
    Hope someone has an idea...
    [EDIT] So http://css-tricks.com/forums/topic/position-fixed-font-weight-is-thinner-new-safari-6-1/ yeah, this is a pain. Now to test outside of Mac OS X Lion… But why iOS too? Will keep y'all updated.
    [EDIT 2] So it is a bug in iOS too, or just how Apple wants it to display. Position absolute fixes it kinda, idk about how to apply it yet. If anyone has a fix I am all ears.
    [EDIT 3] So the fix appears to be the following: -webkit-font-smoothing: subpixel-antialiased; This seems to help all my fonts display consistently across browsers, except iOS which seems to actually thin ALL web font. So I guess I found a fix… but still a huge pain...
  13. After review the two font.css files, they are still quite different. http://www.beta.sunburstrarediamonds.com/ @font-face { font-family: 'lilyupc'; src: url('LilyUPC-Regular.eot?') format('embedded-opentype'), url('LilyUPC-Regular.woff') format('woff');}@font-face { font-family: 'lilyupc2'; src: url('lilyupc_regular.eot'); src: url('lilyupc_regular.eot?#iefix') format('embedded-opentype'), url('lilyupc_regular.woff') format('woff'), url('lilyupc_regular.ttf') format('truetype'), url('lilyupc_regular.svg#lilyupcregular') format('svg'); font-weight: normal; font-style: normal;} http://www.sunburstrarediamonds.com/home.php@font-face { font-family: 'LilyUPC-Regular'; src: url('../fonts/LilyUPC-Regular.eot'); src: url('../fonts/LilyUPC-Regular.eot?') format('embeded-opentype'), url('../fonts/LilyUPC-Regular.woff') format('woff'); font-weight: normal;}I suggest you review them line by line to make sure they are identical for both. Also, make sure that both are using the exact fonts. Don't assume that the font in one folder is the same as the other. The best way to make certain you don't have any duplicates is to get rid of ALL the fonts, font.css files so you can have a clean slate. You would then regenerate the font via Font Squirrel. Upload the font package to both beta and main site. Don't rename or change anything. Now if by chance you are able to reproduce the problem then you will need to explore what is different between the main and beta site. For one, you have other css files listed. I would start with the reset.css file by disabling that. Just keep working your way thru it until you are able to see both sites the same. Keep in mind that both sites are not the same. The beta is pretty bare bone while the main site is not. Hint: You might duplicate the main site and set it up on a beta2 domain so you don't have to touch the live site. The solution is there but you must make certain that both sites are seeing the same files.

    I completely understand they are not the same line by line, but I know the fonts are the same because I decided to copy and paste the exact fonts over and limit it to just fonts that are on the main site, as you can see.The real kicker is this: Even more oddities: http://www.sunburstr...om/index232.php displays different. It is exactly the same the styling and almost the code! I am so confused, my brain hurts.It may not be the complete site, but it consists of the main elements. Still displays differently. Please not that is on the main site just in a different file, linking to the main sites css files and fonts. I will do a exact duplicate and test, but there is no reason that link displays differently.
  14. So to compound the confusion I decided to redo it from scratch, and no results. Then I decided to take the exact font from the original page (not converted or anything), and apply it to the beta page. It displays differently. ITS THE EXACT SAME FILE… Now I am really getting confused and annoyed… Any ideas are appreciated. You can check the beta and non beta pages as I have updated the beta page.

     

    Even more oddities: http://www.sunburstrarediamonds.com/index232.php displays different. It is exactly the same the styling and almost the code! I am so confused, my brain hurts.

  15. As strange as it may seem but when I use certain fonts, some display just fine for one browser and not another. In other cases it displays fine on one server but not on another. In saying, you may need to look into the server set up. Firstly, see if all the mime types are set for each font type. Secondly, I work on a Windows server often and I noticed that the font displays just fine for Firefox but for some reason it would not for IE. The solution was to apply a code snippet into the web.config file to tell the browser to recognize the .woff format. Another note is that not all fonts are the same. Again, on a Windows server, I noticed that some fonts do work regardless which browser I use but I discovered that some fonts were not correctly developed by the author thus causing the problem of not displaying correctly. Again, the solution was the web.config cod snippet. If using PHP then you will probably use .htacess. Also, if you open both of your font.csss file and compare that one of the font's code (other than the name of the font) differ from the other. And finally, why in the world would you want to rename any font if you are wanting to display the same one?

    Well as mentioned before the only discrepancy is between the beta / non beta on safari and iOS devices. They are also on the exact same server, and the server is a Linux and the mime types are set. Now the reason why the code differes is I used the font squirrel system to give me all the web formats. The reason I renamed it was simply my own preference to how I want it to look cleaner (I know I shouldn't but meh...) So in summary, the problem must be a styling somewhere or some other oddity. I am probably gonna start from scratch again and redo the font squirrel stuff and hope for the best. (this is such a pain).
  16. I understand there may be two different fonts available on the web, but what I am trying to say is both the beta font and non beta are the same. They came from the exact same ttf that I have (the ttf that I have is not a suitcase with different styles, it's one singular font), the sole difference is changed the name. I know this cause I did it. Even to make things simpler I even did a test (locally) by copying the non beta ttf form the site, renaming it accordingly and placing it on the beta page with the exact same results. Please understand I am not trying to be difficult, I just know what I did... One last thing, when testing the display issue on all other browsers beside safari and iOS, the fonts display the same, meaning it's a styling issue (I have not found) that affects safari...

  17. Ok! just did retest, its not javascript block, it lists as script 0, object 1 this must relates to loading of font face.

    and the reason you don't see font-family listing for the anchor, is because you have font: inherit set here

    html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {    border: 0 none;    font: inherit;    margin: 0;    padding: 0;    vertical-align: baseline;}

    I never use inherit as it was not compatible for older IE versions, so never bothered using it. I just assign default font-family for body and all it child elements would use this.

     

    You are using a different font, LilyUPC-Regular, compared to LilyUPC, I tried using firebug to change these but nothing happens, its because there is problem loading regular font when required, as when i use web developer addon to change font to match, and use

    @font-face {    font-family: 'LilyUPC-Regular';    src: url('../fonts/LilyUPC-Regular.eot');    src: url('../fonts/LilyUPC-Regular.eot?') format('embeded-opentype'),         url('../fonts/LilyUPC-Regular.woff') format('woff');    font-weight: normal;}

    (also font-color and background color as white on black might show as different to the eye, compared to colours used on non beta), you can save and reload the page and these stay fixed, it shows up as identical.

     

    Okay I am still confused. Let me re-explain what I see on my end. I will preface with I am using Safari on a Mac, this could be why we are not seeing eye to eye, this issue also persists on iOS devices. Regardless the issues you are bringing up are not really issues. First off regardless of being "inherit" or not on the anchor displayed on the non beta site, the font still loads, the font also loads on the beta site too, but it does not display the same. The non beta site displays thinner while the beta site remains kinda fat. Now using whichever tool you wish if you go style by style they are nearly identical to each other both the h2 and anchor on the beta site and the anchor on the non beta site. So with why the inconsistency? In regards to the concern over being a different font, it is not. The only difference actually is the name. I have the original TTF from the non beta site and just converted it using font squirrel to give me all the different web formats, in turn the fonts were also renamed. So they are the same font to be clear.

     

    From all my playing, following all your guys tips and pointers, they have no effect on how the font is displaying on my end. I hope someone has something cause this issue is really starting to annoy me. (The reason for all this is I am recording the site to help speed it up and such, but if I can't even get the stuff to display the same, it is useless.)

     

    Thanks again for any further help.

  18. Via using my Firebug tool, I was able to get it to look the same thus using font-weight: normal in the h2 element.

    How come then the anchor does not look the same… As mentioned also I did apply the font-weight normal...

     

    Two things i noticed

    beta

    I have a 'no script addon', which disables JavaScript, and on startup the font must be set to browser default, as i get popup to enable js, when i do it proceeds to show the correct font.

    the font shown to be used is font-family: "LilyUPC";

    non beta (home page- top right )

    Does not shows font used, when you select element anchor, i expect it to show the font-family: even if it is set in the upper hierarchy elements of body, or the container it is in #tollfree.

    If you inspect #tollfree it shows font-family: LilyUPC-Regular,arial,helvetica,sans-serif; but for some reason the anchor does not pick this up.

    Okay thats a good bit of info, but how does it solve the problem… Does font-face require javascript? The non beta page should show the font as well, it does on my end and every other computer/browser I have tested on. So why the inconsistency?

×
×
  • Create New...