-
Content Count
6,070 -
Joined
-
Last visited
-
Days Won
2
Everything posted by jlhaslip
-
Spring Is Gardening Time Who has time to do some Gardening?
jlhaslip replied to jlhaslip's topic in Home & Garden
I have always planted Marigolds around Cabbage plantings and that keeps most of the bugs off of them. The two plants compliment each other somehow. Don't know the science, but I do know the results.And lots of onions and Garlic, indeed. -
Dealing With Links Like ?id=123 pls help in a small issue
jlhaslip replied to apple's topic in Programming
One method is to define an array of suitable values. In the following snippet, I have defined an array which I use on a small site. $data_array = array('index', 'one', 'two', 'three', 'four', 'five', 'contact'); And then I use the following block of code to make sure the "?page=" contains one of those array elements or they get redirected to the index.php page. Your example uses "?id=", so you will need to modify that. And also, this code block needs some further security added to it, and as you can tell, I include files with ".txt" file extensions. (Included files always parse as html. Add the php tags inside them if they contain php code) The file extensions will need to be altered to the file extension you use. Small changes, really. $submit = $_GET ;echo $_GET ; // echo to confirm the value as a test onlyif( !isset($_GET ) ) { // page is not set , use first array element if (file_exists($data_array[0] . '.txt' )) { include ( $data_array[0] . '.txt' ); } else { include ('index.txt'); // or default to index page if first file doesn't exist } } elseif (in_array($submit , $data_array)) { // value is in array if (file_exists($submit . '.txt' )) { // and exists include ( $submit . '.txt' ); } else { include ('index.txt'); // default to index page } } else { // value is not in array if (file_exists($data_array[0] . '.txt' )) { // and first array name exists include ( $data_array[0] . '.txt' ); } else { include ('index.txt'); // or use index page } } If you follow the script logic, the default page which is included is the index page. Other values must be contained in the defined array. As you add pages, simply add an element to the array defined above. There are other methods to use, just thought you might like to see this one and I had it handy. Hope this helps. -
Lots of good knowledgeable coders right here at the trap. If you were to state what you would need, I'll bet someone would at least assist you with the design, if not create it completely, but then you wouldn't learn that way, so another alternative would be http://www.oswd.org/ OpenSourceWebDesigns and then modify the page to suit yourself The members here would answer all your questions..
-
Banner Requestt [denied] Thank you
jlhaslip replied to FYC BAMATIME's topic in Graphics, Design & Animation
Please read the pinned topic to see your requirement(s) in Request Free Sig Or Banner section. Click here In the mean time please improve your post quality and continue to contribute quality posts. -
What Does This Do? ban = (data-login) ? lban : iban;
jlhaslip replied to peroim's topic in Programming
That is a terniary (sp) statement. Like an IF statement, but very concise. If the condition [$ban = ($data->login)] is evaluated to true, then perform the assignment following the '?'. [$lban] If the condition [$ban = ($data->login)] is evaluated to false, then perform the assignment following the ':'. [$iban] see also here at the php.net site: http://forums.xisto.com/no_longer_exists/ -
http://forums.xisto.com/no_longer_exists/ has a couple of Templates. See if one suits your needs and save it to your machine. or try http://forums.xisto.com/no_longer_exists/ . There is a php-driven template on there. You won't be able to snag the php code, but PM me to have a copy sent to you.
-
Or <?php in case short_tags is set to off.
-
Designing A House HVAC and other considerations
jlhaslip replied to Watermonkey's topic in Home & Garden
Using a thermal mass such as rock and sand is an excellent way to store excess heat from the daytime and draw on this reserve through the night or cloudy days and it has been done this way for years. Lining the "reservoir" with an impervious membrane (6 mil poly) should reduce the humidity of the storage area as well. I have seen where the air is forced through a series of "tubes" (concrete blocks positioned to act as tubes) to pick up or deliver the heat and also embedding waterlines in the sand bed also allows you to generate heat from roof mounted panels during warm, sunny periods.As for payback, the consensus would be that the passive Solar heat is quite cost effective and the payback period is shorter than you imagine. Geo thermal might cost more to install, but the reduced energy costs in operating the system will be to your advantage in a relatively short period, afaik.Additionally, using a "panel" form of insulation in the construction has advantages, too. Less thermal bridging and therefore, more effective insulating qualities. The weak spot in most roof systems is the lumber material bridging between the warm and cold spots. Panels reduce the bridging of the tmperature zones. if you ever see a roof with "frost lines" in spring and fall seasons, that house has serious "thermal bridging" happening. -
The easiest way to mod this thing might be by using the edit capabilities within the Greasemonkey itself. Just install the script as per the author's page, then select to edit the script from Tools > Greasemonkey > Manage Users Sripts > Edit. Cut and paste the following re-structured page into the editor, overwriting the original, to make the script suitable for Xisto Mods. // ==UserScript==// @name IPB moderator reasonator - Xisto version// @namespace [url="/topic/46026-firefox-greasemonkey-invision-board-tool-for-warning-ipb-warning-shortcut/"]http://forums.xisto.com/topic/46026-firefox-greasemonkey-invision-board-tool-for-warning-ipb-warning-shortcut/;// @description Provides a select box with common reasons to warn people on the IPB warning page// @include [url="/index.php?act=warn;*"]http://forums.xisto.com/index.php?act=warn;// ==/UserScript==textarea = document.getElementsByName('reason')[0]parent = textarea.parentNodebr = document.createElement('br')//The drop down menuselect = document.createElement('select')select.setAttribute('onchange','warn_add_reason(this.value)')//Now lets create the "append rules link" buttonbutton = document.createElement('input')button.type = "button"button.value = "append rules link"button.setAttribute('onclick','warn_add_rules()')//Add the reasonsreasons = new Array()if (location.href.substr(53,3) == "add") {reasons[0] = new Array("Select a reason","Select a reason for adding to the warning") //Do not changereasons[1] = new Array("===================================", "Select a reason for adding to the warning")reasons[2] = new Array("Abusing Members","Abuse of other members on the forum:")reasons[3] = new Array("Advertising", "Advertising:")reasons[4] = new Array("CODE tags for code missing","Posting code without CODE tags:")reasons[5] = new Array("Double Posting","Double posting:")reasons[6] = new Array("Illegible Text Style (Repeated Offence)", "Illegible Text Style:")reasons[7] = new Array("Lack of Contribution","Posting lacking contribution:")reasons[8] = new Array("Personal Information Posted","Posting private information:")reasons[9] = new Array("Plagiarising","Direct copy and pasting without use of QUOTE tags:")reasons[10] = new Array("Pornography", "Pornographical material:")reasons[11] = new Array("Posting a link to an illegal website","Posting a link to an illegal website:")reasons[12] = new Array("Referral links","Posting referral links:")reasons[13] = new Array("Signature Too Big (Repeated Offence)","Signature still too large.")reasons[14] = new Array("Triple Posting", "Triple posting:")reasons[15] = new Array("Warez Discussion","Engaging in the discussion of warez:")reasons[16] = new Array("===================================", "Select a reason for adding to the warning")reasons[17] = new Array("Other Offence", "")} else {reasons[0] = new Array("Select a reason","Select a reason for lowering the warning") //Do not changereasons[1] = new Array("===================================", "Select a reason for lowering the warning")reasons[2] = new Array("Good posts", "Good posts recently")reasons[3] = new Array("Helpful member", "Thanks for being a helpful member")reasons[4] = new Array("Reporting posts", "Thanks for reporting some posts recently")reasons[5] = new Array("Superb post", "Fantastic post:")reasons[6] = new Array("===================================", "Select a reason for lowering the warning")reasons[7] = new Array("Other Reason", "")}for (i=0; i<reasons.length; i++){ eval("child_"+i+" = document.createElement('option')") reason = escape(reasons[i][1]) //so quotes can be used eval("child_"+i+".value = '"+reason+"'") eval("child_"+i+".innerHTML = '"+reasons[i][0]+"'") eval("select.appendChild(child_"+i+")")}parent.insertBefore(select,textarea)parent.insertBefore(button,textarea)parent.insertBefore(br,textarea)// executed from within the pagefunction warn_add_reason(reason){ document.getElementsByName('reason')[0].value = unescape(reason)}function warn_add_rules(){ domain = location.href.substr(0,location.href.substring(8,location.href.length).indexOf("/")+8) //get the domain namedocument.getElementsByName('reason')[0].value += "\n[url="/"+domain+"/?act=Help&CODE=01&HID=18"]Xisto Readme [/url]"}unsafeWindow.eval(warn_add_reason.toString())unsafeWindow.eval(warn_add_rules.toString())
-
As you find and install Greasemonkey, there are a couple of thinghs to edit in the script. The changes can be performed after the install by selecting the Greasemonkey extension in the Tools Menu. To Change the url and text string for the "Rules Link", Find : document.getElementsByName('reason')[0].value += "\n[url=\""+domain+"/?act=boardrules\"]Read the rules[/url]"}Change to : document.getElementsByName('reason')[0].value += "\n[url=\""+domain+"/?act=Help&CODE=01&HID=18\"]Xisto Readme [/url]"} To Change the Host and page which triggers the Dropdown menu, Find : // @include http://forums.xisto.com/no_longer_exists/;*Change to : // @include http://forums.xisto.com/index.php?act=warn&type=add;*[hr=noshade] Also, the Drop-down can be made tpo appear when you are reducing a warning by including the following Wildcard string in the list of pages: http://forums.xisto.com/index.php?act=warn&type=minus;* It might be suitable to add the reasons for reducing the warnings if you are going to do this. Choose to edit the script in the Tools > Greasemonkey > Manage Script > Edit. (specify your Editor of choice)[/hr]
-
Yes, the Cpanel has an IP denial script in place.Sign-on to your Cpanel and look for "Site Management Tools / IP Deny Manager " in the list of features available.
-
The Lion might be King of the Jungle, but this monkey hasn't been told yet. https://ca.yahoo.com/ cute video, at the least
-
Spring Is Gardening Time Who has time to do some Gardening?
jlhaslip posted a topic in Home & Garden
Well I certainly do. It is a pleasure to be out there digging and planting and watering and just plain enjoying the time I spend outside in the Garden. Just dug a new, small plot for veggies last Fall, so I expect that this first crop won't be "fantastic", but I would rather have Home Grown Veggies rather than the stuff that is a chemicalled up and over-priced to boot. Nothing like garden-fresh foods. -
I don't do ASP, but open up the file in your browser and then do a View > Source to see what the html output looks like. Might be a clue in there. Perhaps the anchor tags are not being written properly. The View > Source will tell you.
-
The Trap17 Forums "reply" Mod [resolved]
jlhaslip replied to mojoman's topic in Websites and Web Designing
I thought this was a 2.2 version? Might need an admin to say exactly, but seems to me I remember seeing or reading that this recent upgrade is to an IPB version 2.2. -
Happy Birthday, Mich! Loud enough?
-
Another couple of thing about "includes" which should be considered: By using a PHP file extension, in the odd chance that someone tries to "view" the file on your account, if the filename ends in ".php" (or another file extension which has been determined to be parsed as php according to the rules in your .htaccess file), the script contents will not be viewable in their Browser, only the HTML output would be shown to them, whereas a file ending in "inc" is merely a text file which can be viewed. This is particularly important for information which should be "secured", like your Database Configuration information with database names and passwords.Another thing, use the "include_once()" and "require_once()" if the contents of the include contains information which could affect the value of your variables. An example, again would be the config.inc. In a situation where you might be adding a variety of includes, each of which might call other includes, etcetera, and some of the includes may have been already opened, ie: a database config file, or a functions.inc which has a series of define statements, the "*_once()" will only allow that file to be called the first time so that any values do not get reset.And the difference between an "include()" and "require()" is the script will terminate on an error if the require() is used. A situation where you might consider using the require() is for opening sensitive files and don't wish the client to view the data contain in the error, for example, the database connection information, or the locations of the included files.While I am spouting here, additional security can be achieved by locating the included files "above" your public_html folder, in the account root folder. On the Apache servers like what the Trap uses, if the file is in the public_html folder, it can potentially be accessed from the Web directly by URL. When it is located "upstream" of the public_html folder, it would be doubly secure with a php file extension.All of these methods enhance the security of your data and files, and these security measures can all be in effect, yet your site remains at risk. Files and accounts and servers are never completely secure against attacks. Security is not "on" or "off". Security is a continuum. There is "more security" and "less security". Complete security is a situation where the files are on a CD or DVD in a desk drawer, but then they are not web-accessible. So, it is important to know and implement the security measures you can feel comfortable with while remembering that more security means potentially less access. That is the trade-off you must measure.
-
Is this any better?Adjust the spacing by increasing the margin on the class. <head> <title>An XHTML 1.0 Strict standard template</title> <meta http-equiv="content-type" content="text/html;charset=utf-8" /> <meta http-equiv="Content-Style-Type" content="text/css" /> <link type="text/css" rel="stylesheet" href="./w3c_suggested.css" media="all" /></head><style type="text/css">.box { margin: 0; padding: 0em; }.centre { margin: 0 2em; text-align: center; }</style><body> <div class="box"><p class="box" >Beginning<span class="centre">with</span> A</p><p class="box" >Beginning<span class="centre">with</span> C</p><p class="box" >Beginning<span class="centre">with</span> V</p><p class="box" >Beginning<span class="centre">with</span>W</p><p class="box" >Beginning<span class="centre">with</span> I</p><p class="box" >Beginning<span class="centre">with</span> M</p><p class="box" >Beginning<span class="centre">with</span> P</p></div></body></html> I placed a "non-breaking space" in the narrow glyphs and two in the "I". No adjustment to the 'W'. Might work?
-
"All those files" are required by the Apache web Server to control your account and it contains things like who can access what. By eliminating them, there is no access allowed by anyone, including you. That is a feature of the Apache server software which makes it one of the most secure servers available on the web. Unless access is specifically allowed, there is no access, period. Read up on the Apache Directives and you will understand how they work. Basically, by deleting all those files and folders, all access is now denied to your account. Admins may be able to restore them, but maybe not.
-
On the php.net site, search for htmlentities() and nl2br(), the functions which converts potentially dangerous and damaging code tags from their 'regular' form into a format which is not dangerous nor damaging and there are others I am sure . Finding these functions and following the links in those descripptions will lead you to other functions to use, too. The original data contains internal characters for tabs, carriage returns, new lines, etc, so the data needs to be altered from its source, to some thing safe. Use functions like these to do the cleansing. Then, when you remove the data from the database and proceed to print it or display it, the product looks the same as when it went in. http://php.net/
-
- Board Rules - - Beginner Tutorial - These should give you an idea about the Forum, its guidelines and practices. And the second one explains quite a bit about the Hosting and whatnot. Browse through the index page and you will have a good understanding of the structure of the Forum and the various sections. You should be able to find a topic or two about something that interests you. Leave a posting of your own and earn credits towards your Hosting package.
-
Nice little story and all true.------------------------------For all of us who feel only the deepest love and affection for the way computers have enhanced our lives, read on.At a recent computer expo (COMDEX), Bill Gates reportedly compared the computer industry with the auto industry and stated, "If GM had kept up with technology like the computer industry has, we would all be driving $25.00 cars that got 1,000 miles to the gallon."In response to Bill's comments, General Motors issued a press release stating:If GM had developed technology like Microsoft, we would all be driving cars with the following characteristics:1. For no reason whatsoever, your car would crash........ twice a day.2. Every time they repainted the lines in the road, you would have to buy a new car.3. Occasionally your car would die on the freeway for no reason. You would have to pull to the side of the road, close all of the windows, shut off the car, restart it, and reopen the windows before you could continue. For some reason you would simply accept this.4. Occasionally, executing a maneuver such as a left turn would cause your car to shut down and refuse to restart, in which case you would have to reinstall the engine.5. Macintosh would make a car that was powered by the sun, was reliable, five times as fast and twice as easy to drive - but would run on only five percent of the roads.6. The oil, water temperature, and alternator warning lights would all be replaced by a single "This Car Has Performed An Illegal Operation" warning light.7. The airbag system would ask "Are you sure?" before deploying.8. Occasionally, for no reason whatsoever, your car would lock you out and refuse to let you in until you simultaneously lifted the door handle, turned the key and grabbed hold of the radio antenna.9. Every time a new car was introduced car buyers would have to learn how to drive all over again because none of the controls would operate in the same manner as the old car.10. You'd have to press the "Start" button to turn the engine off.Please share this with your friends who love - but sometimes hate - their computer!
-
And the smilies look borked on this skin. They need to be clean up around the edges and borders made transparent, or something.