Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by primefalcon

  1. get pages do seem to index fine I have never had a problem though I do use mod rewrite nevertheless
  2. we know what he meant on that issue though a server running windows, at least we can hope thats what he meant since the server is actually apache.Though I would actually recommend xampp over wamp, but when you can start experimenting setting up your own server, ity's not actually that complicated and a lot easier to upgrade and manage once you get the hang of itthose errors are also simply saying the files you are trying to move do not exist or at least exists where you said they do, also try declaring the file base as document root it'd make things a lot easier for you
  3. Actually yes you can, but only as binaries, you have to install it yourself At the snapshots part of php.net, Though I would still recommend php5 atm, after after you get familiar with php a little start to read up on php6
  4. Ok that works great, thank you though you have script color changes using that seems to stop the standard bg.color from working, which is honestly no big deal, since I can just convert it all over to rgb which easier to work with anyhow.Thank you
  5. I pretty adept these days at php, and decided to start delving into the client side scripting as php alone doesn't do everything I want such as pulling data from databases without reloading screen, automatically refreshing that data at say 1 second intervals without reloading the page and more, for use on chat rooms and more.I've been starting to try and study JavaScript today its seems simpler than I thought with a syntax very close to php using and if else and such as well.anyhow I have a script specific question for my learnings In a specific script iI was writing it had this line of code <a href="java script:;" onclick="document.bgColor='#E3701A'">Testing 1,2 and 3</a> now that is largely my own modification of their example to find out how it works but I've tried to use an rgb value in there like this <a href="java script:;" onclick="document.bgColor='rgb(55, 55, 55)'"> and I cant get it to work, is there a way to use rgb values in this style or am I trying to do something impossible? Thank you in advance for any help :-)
  6. Thank you a lot :-), actually I can easily see how this is being done a a element is veing created and givn an atrribute with the value of the sitelink element which is then converted over to htmlNow I just need to find some sort of way to do a nl2br and I'll be set, this xslt language is hard to get to grips with, it's similar to scripting languages in some ways and completely different in others
  7. ahh beautiful and I see exactly how it was done too. Thank you very much :-)
  8. Ok thats working but it's leaving another tiny problemthe name isn't pulling the name from the xml file its just saying name, the hyper link is working good though
  9. I cant get that to actually work either :-(
  10. Ok I've written up this little xml document, no hassles no fuss <?xml version="1.0" encoding="utf-8"?><?xml-stylesheet type="text/xsl" href="toollinks.xsl"?><toollinks> <link> <name>Travian Tool</name> <description>Some great useful tools and utilities, Simply click amongst the tools on the right hand menu to view in-active finders and such, very useful</description> <sitelink>http://traviantool2.ww7.be/index.php?lang=com</sitelink> </link> <link> <name>Travian Toolbox</name> <description>Another Site with a ton of useful tools and utilities</description> <sitelink>http://www.traviantoolbox.com/index.php?lang=en</sitelink> </link> <link> <name>Battle Report publisher</name> <description>A great alternative tool to copy battle reports into, it analyzes the information you provide and rebuilds it into a user friendly format</description> <sitelink>http://travilog.org.ua</sitelink> </link> <link> <name>9 and 15 croppers finder</name> <description>A good cropfinder utility</description> <sitelink>http://asite.110mb.com/cropfinder.php</sitelink> </link> <link> <name>Travian Flash map</name> <description>With Flash map you can: observe villages, alliances and player positions. Get short info about village. Go to player/alliance profile or get straight to the village position in Travian. Get a direct link for the map and share it. Calculate distance between villages and travel time of you army</description> <sitelink>http://travian.org.ua/com</sitelink> </link> <link> <name>Travian World Analyzer</name> <description>Using it you can easily find inactive neighbours for farming, view population growth of your enemies, track all the events in the world. For example: village conquering, players changing alliance and the foundation of new villages. In the "day overview" page, you can see which villages and players have the highest population growth, which villages are under attack and the greatest losers.</description> <sitelink>http://travian.ws/</sitelink> </link></toollinks> which there's no problem with, I've parsed with php, and alsoused a simple xsl file for a stylesheet, works fine.but since I'm very new to XSL I seem to be having a problem with displaying hyperlinks in this langauge, here's an attempt I've tried, I've tried several different ways but I just cant get it, this XSL seems very simple but I just cant work out hyperlinks without resorting back to php parsing, which I'm trying not to do, anyhow here's my pitiful attempt <?xml version="1.0" encoding="utf-8"?><xsl:stylesheet version="1.0"xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:template match="/"> <html> <body> <h2 align="center">Tools for Travian</h2> <table border="1"> <tr bgcolor="#9acd32"> <th align="left">Name</th> <th align="left">Description</th> </tr> <xsl:for-each select="toollinks/link"> <xsl:sort select="name"/> <tr> <td><a href="<xsl:value-of select="sitelink"/>"><xsl:value-of select="name"/></a></td> <td><xsl:value-of select="description"/></td> </tr> </xsl:for-each> </table> </body> </html></xsl:template></xsl:stylesheet> Any help would be appreciated thanks
  11. actualy you'd be better off using PHP or another server side scripting for this otherwise it'll keep changing backIll give you an example of one simple script I used to come up with this this solutionfirst off you have to have links in your menu with added values for which stylsheet you wish to use such as<div class="sitenavigation"><span class="menuheads">Site Styles</span><br /><ol><?php$siteserv = $_SERVER['SERVER_NAME'];?><li><a href="http://<?php echo "$siteserv"; ?>/switcher.php?stylesheet=default">Default</a></li><li><a href="http://<?php echo "$siteserv"; ?>/switcher.php?stylesheet=easyreading">Easy Reading</a></li></ol></div> remember to adjust this so it links to the right placenext just use this simple switcher script I have written <?php$sitedomain = ereg_replace('www.', '', $_SERVER['SERVER_NAME']); /* ------------------------------------------------------------------------------------------------ */ /* ------------------------| CHECK IF BROWSER CAN SUPPORT COOKIES |-------------------------------- */ /* ------------------------------------------------------------------------------------------------ */if (isset($_COOKIE['stylesheet']) AND ($_GET["check"] == "yes")){$prevpage = $_COOKIE["prevpage"];setcookie ("prevpage", "$prevpage", time(), "/", "$sitedomain", "0");$prevpage = urldecode("$prevpage");$prevpage = unserialize("$prevpage");header("Location:$prevpage");exit();}elseif (empty($_COOKIE['stylesheet']) AND ($_GET["check"] == "yes")){include ($_SERVER['DOCUMENT_ROOT']."/nocookies.inc");exit();} /* ------------------------------------------------------------------------------------------------ */ /* -----------------------------| INITIAL RECIEVING FILE |----------------------------------------- */ /* ------------------------------------------------------------------------------------------------ */if (isset($_GET['stylesheet'])){$stylesheet = $_GET['stylesheet'];$prevpage = $_SERVER['HTTP_REFERER'];$confirmed = "confirmed";$prevpage = serialize("$prevpage");$prevpage = urlencode("$prevpage");setcookie ("prevpage", "$prevpage", time()+10, "/", "$sitedomain", "0");setcookie ("stylesheet", "$stylesheet", time()+31536000, "/", "$sitedomain", "0");header("location: $thisfile?check=yes");exit();}else{header("Location:http://$sitedomain");exit();}?> the 3rd part is at the top of evbery page on your site you need do access the cookie and read itusing <?php$siteserv = $_SERVER['SERVER_NAME'];$stylecookie = $_COOKIE["stylesheet"];if ($stylecookie == "default"){$link = "http://$siteserv/styles";}elseif($stylecookie == "easyreading"){$link = "http://$siteserv/stylesalt";}elseif($stylecookie == "orangegrad"){$link = "http://$siteserv/orangegrad";}else{$link = "http://$siteserv/styles"; }?><link rel="stylesheet" type="text/css" title="User Defined Style" href="<?php echo "$link"; ?>.css" /> remember the files that this code is in has to have the eextension of .php instead of .htmlthis way it'll remember which stylesheet your using indefninately and the code is browser independant
  12. phpfreaks.com are pretty cool as well
  13. One thing I also do is take the ip address of every user, if I get 1 spammer.I actualy ban that ip address from seeing the form or submitting a form again
  14. Second one actually answers my question.
  15. I've seen a couple of pages that have the file extension of .ws instead of html or php or such, does anyone know what markup or scripting language these use?I'm just curious as I've seen a few around
  16. Nvm Problem solved, don't ask what silly mistake I made
  17. Hi I wrote up a simple random generation script quickly which works as intended, however as is common I have ran into a little problem, here's the code: <?php$blogs_array = array('<li><a href="url">site1</a></li>','<li><a href="url">site2</a></li>','<li><a href="url">site3</a></li>');shuffle ($blogs_array);?><?php for ($i = 0; $i < 3; $i++) { echo "$blogs_array[$i]";}?> I've replaced the array urls with just url for privacy.My problem is that with the script running, the same link can appear twice, is there a way to prevent an entry from appearing more than once?
  18. I'd have to say that I myself would say hand coding.Gives a bit more control over the code, and if you need to debug, you know exactly what the code is and what it does.also programs get massively upgraded and changed, and you have to keep learning aspects of that program, and what if that program gets discontinued like frontpage.If you learn and write the code yourself, that can't happen, and as for text editor, I'd recommend Crimson Editor
  19. primefalcon


    I was reading a little about the new candidate recommendation SSML.Is there going to be a new tutorials coming out for this soon? or will we have to wait until it becomes a full recommendation.I can see this new language being a great benefit, I haven't read fully into the code behind this yet, but will we be able to combine this with html/css/php, any info or discussion on this would be highly interesting
  20. thats what I feared, oh well i don't exactly want whole page flickering quicklythe only other option I thought of was using an Iframe and having a meta refresh inside the Iframe but that seems rather simplistic, besides, that gives a flicker element as well
  21. Hi I'm currently putting together a simple PHP shout box board, which I'm finding rather easy....Though I do have one question, I was wondering which would be the best way to have the shout box automatically show the latest comments.I was thinking I probably have to learn Ajax, however if there is another easier way of doing this dynamic refresh without learning JavaScript and then Ajax, it would make things a lot easier....Anyhow my question is this, is there anyway to accomplish this task via PHP or will I, as I fear have to learn JavaScript then AJAX for this?
  22. personally I use<php include("filename.ext"); ?>the main reason I keep full though is keep form with the rest
  23. NVM Problem is solved I forgot the post/get
  24. primefalcon

    php name block

    In trying to write up the following script <?php include("banned.php") ?> <p/><br/><table class="fore" align="center"><tr><td><?php$address = $_SERVER['REMOTE_ADDR']?><?php$badname = array("example1");?><?phpif ($rs_name == in_array($badname)){ echo "<br/><br/><center> <font color='orange' size='4'>This name has been Blocked from the registry submitter<br/>If you are the owner of this account<br/>Please use the contact us form to verify you are the account owner<p/>Account verification requires in-game verification </font> </center>"; exit(); }?><?php$con = mysql_connect("erased for my own security");if (!$con) { die('Could not connect: ' . mysql_error()); }mysql_select_db("runeregistry", $con);$sql="INSERT INTO user_submit (rs_name,ip_address,url,description)VALUES('$_POST[rs_name]','$address','$_POST[url]','$_POST[description]')";if (!mysql_query($sql,$con)) { die('Error: ' . mysql_error()); }echo "<center><b>Thank you for registering.</b><br/>We will add your entry as soon as possible.<p/>Please note, if you do not have a website or blog,<br/>you can easily create a blog <b>free</b> by clicking the link on the left<br/>or by clicking <a href='http://runescaperegistry.com/rrblog'><b>This Link</b></a>.<p/>After you create a blog with us, let us know if you want the link added to your Runescape Registry listing!<br/>Your blog doesn't have to be Runescape related. Just have some fun!!!<br/>However, only websites related to Runescape in some way can be posted on this registry.</center>";mysql_close($con)?>
  25. here's the script I'm trying to use: var framesetPage = "index.php";var currPage = justTheFilename(self.location.pathname);if (top.location == self.location && framesetPage != currPage) { self.location.replace(framesetPage + "?" + currPage);}window.onload = chgFrame;function chgFrame() { if (top.location == self.location && document.location.search) { var linkURL = justTheFilename(document.location.search); var contentWin = document.getElementById("content").contentWindow; var currURL = justTheFilename(contentWin.location.pathname); if (currURL != linkURL) { contentWin.location.replace(linkURL); } }}function justTheFilename(thisFile) { if (thisFile.indexOf("/") > -1) { thisFile = thisFile.substring(thisFile.lastIndexOf("/")+1); } if (thisFile.indexOf("?") == 0) { thisFile = thisFile.substring(1); } return thisFile;} the way it works is it whena page loads without the navigation frame in a framed website, it will call the nagication frameset, and then load the page that was found in the content area.and I've got it working fine if the all the files are in the same folder location, though in subfolders I cant seem to find a solution to thus.Anyone have any idea how to get around this little problem?
  • Create New...