Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

ChubbyKakert

Members
  • Joined

  • Last visited

Everything posted by ChubbyKakert

  1. Im not sure where to post this thread so forgive me if this is the wrong section. I am currently adding a cookie notice to my website but i am not sure about some things. So thinking of cookies make me think they are sessions? Are they or are they not? If they are not, what else are cookies? Because my website is hard-coded and doesn't use any plug & play solutions i don't think i'm working with cookies. Well actually i work with one session and thats basically only storing the userid into a session. Can i now say that i use only use essential cookies? I am really confused at this concept.
  2. These written posts with casino links are flooding the internet lol.
  3. @fisicx I don't know howmuch users your site has but a 10$ monthly fee seems really cheap. I used to have a webshop with a several hundred visitors and people paid me like 400$ monthly for a small banner. Advertising is expensive.
  4. There still seems to be something wrong. This is the code: $getordersquery = $db->query("SELECT *, (DATE(ORDERYEAR)+DATE(ORDERMONTH)+DATE(ORDERDAY)) AS date FROM SHOPORDERS WHERE USERID = '$dbget_id' ORDER BY date ASC"); I tried both DESC and ASC but the results are the same. What am i doing wrong? Please don't pay attention to the date format. There should be only a yesterday or today on the date but i have the full date for testing purposes. I know that i could use the Order ID to order them but i think doing it on date would be better and useful cause i will need it for the forums too etc.
  5. Hello everyone, Currently creating a my orders page for the shop on my website. I learned the hard way that you shouldn't use just 1 field for the date but need separates for day month and year because when you have 01/01/2018 it doesn't work order after the /. So this seems to work: SELECT *, (ORDERDAY+ORDERMONTH+ORDERYEAR) AS total FROM SHOPORDERS WHERE USERID = '$dbget_id' ORDER BY total DESC Is the code above the correct way to order them? Edit: I think this did the trick: SELECT *, (DATE(ORDERYEAR)+DATE(ORDERMONTH)+DATE(ORDERDAY)) AS date FROM SHOPORDERS WHERE USERID = '$dbget_id' ORDER BY date DESC
  6. The thing with the propitiatory chats applications is that it might be hard to implant it so it runs with the same chat as it does in-game. Otherwise it would be useless.
  7. Hi everyone, For some kind of mmorpg we are creating a new website. We have a chat interface in-game which is used by administration/moderation to communicate with each other while they are in-game issuing reports, searching for hackers/rulebreakers. While they are doing this, communication with other staff members is essential. The interface used in-game uses a small table in a SQL database. New messages are send to this table and a code in the script of the game displays the new message whenever a new message is send. We want to take this chat to the website. Because some administrators or moderators may not be available in-game, but on the website. They still require to communicate with eachother. Now before i start writing a page for this chat. I must tell that my knowledge does not go beyond PHP HTML and SQL. I was thinking that the chat would not be live on the website. The user would have to refresh the php page in order to read the new messages. I have been searching a while and came across AJAX. Can i show the info from the database live on the webpage using ajax? And if yes, how? Thanks in advance.
  8. Thanks you for the information. What does Sum() actually do? I have it without sum now because i don't understand what it does.
  9. Currently i only added 4 skills to the calculation because i am still testing it. So actually the sql query does the part for me that decides which user has more xp then another player. This is the full code to make it more understandable: $countusers = 0; $countuserq = "SELECT * FROM CHARACTERS"; $countuserstmt = $db->query($countuserq); while($rowcountuser = $countuserstmt->fetchArray(SQLITE3_ASSOC)) { $countusers += 1; } $limit = 30; $countusers = SqliteNumRows($countuserstmt); $total_pages = ceil($countusers / $limit); $record_index= ($page-1) * $limit; $sql = "SELECT * FROM CHARACTERS ORDER BY PLAYINGHOURS DESC, CRAFTINGXP DESC, CRAFTINGLEVEL DESC, FISHINGXP DESC, CRAFTINGLEVEL DESC, WOODCUTTINGXP DESC, WOODCUTTINGLEVEL DESC, FIREFIGHTERXP DESC, FIREFIGHTERLEVEL DESC LIMIT $record_index, $limit"; $stmt = $db->query($sql); ?> <table class="table table-striped table-bordered table-hover" style="width:100%;" align="center"> <thead> <tr> <th>Rank</th> <th>Character</th> <th>Total Level</th> <th>Total Experience</th> </tr> </thead> <tbody> <?php error_reporting(E_ALL); $ranknr = 0; while($row = $stmt->fetchArray(SQLITE3_ASSOC) ) { $ranknr += 1; $totallevel = $row['FISHINGLEVEL'] += $row['PLAYINGHOURS'] += $row['CRAFTINGLEVEL'] += $row['WOODCUTTINGLEVEL'] += $row['FIREFIGHTERLEVEL']; $totalxp = $row['FISHINGXP'] += $row['CRAFTINGXP'] += $row['WOODCUTTINGXP'] += $row['FIREFIGHTERXP']; echo "<tr>"; echo "<td style='width:5%;'><center>".$ranknr."</center></td><td><a href='index.php?p=listcharacters&id=".$row['ID']."'>". $row['FIRSTNAME'] . " ". $row['LASTNAME'] . "</a>"; echo "</td><td>".$totallevel."</td>"; echo "<td>".$totalxp."</td>"; echo "</tr>"; } So take a look at Earl's, And Samuel's xp and levels: Earl: Samuel: Could it be that Earl is ranked higher because it prioritizes Fishing skill over fire fighter? What is a better way to do this? Edit: Playinghours are counted as level. So when the player has 50 playing hours it counts 50 + the other levels. Earl has 0 playing hours. Samuel does have 0 too. But gained 1 level from fire fighing. Players start at level 0 with skills.
  10. It looks really great actually. I suggest to add more content. I can't find any contact details. Can't find anything about the company either. Also be more specific in pricing area because you don't tell the user if the price is monthly or yearly etc.
  11. ChubbyKakert replied to LWC's topic in General Chat
    Welcome
  12. Hello there, I am creating a high scores page where the players will be ranked based on their total level and total experience. As you can see in this screenshot below, you can see that Samuel MacHolland is ranked lower then Earl Webster while Samuel should be ranked higher then Earl. Why is this happening? It works fine for the all records except the 2 visible in the screenshot. Here is the code that i use: SELECT * FROM CHARACTERS ORDER BY PLAYINGHOURS DESC, CRAFTINGXP DESC, CRAFTINGLEVEL DESC, FISHINGXP DESC, CRAFTINGLEVEL DESC, WOODCUTTINGXP DESC, WOODCUTTINGLEVEL DESC, FIREFIGHTERXP DESC, FIREFIGHTERLEVEL DESC LIMIT $record_index, $limit // query that is used. Record_index and limit is used for pagination. What could be wrong here?
  13. Hello, To me it sounds like they are trying to avoid paying you for your services. Did they talk about not using the product and then end up not having to pay? Also, haven't you signed some kind of agreement with them? If you haven't then all i can say that its a hard lesson to learn.
  14. Edit: About SCEditor... I currently am trying it out and sofar its exactly what i need except.. http://losangeles-roleplay.org/example.html When you type test. Press enter for new line it doesn't add a [br]? Shouldn't it do that automatically? Thanks. So is there also something to process bb code? Currently doing it like this: // bb to html $getthethreadcontent = htmlspecialchars($getthethreadcontent); $getthethreadcontent = str_replace('[url=&quot;','<a href="', $getthethreadcontent); $getthethreadcontent = str_replace('&quot;]','">', $getthethreadcontent); $getthethreadcontent = str_replace('[/url]','</a>', $getthethreadcontent); $getthethreadcontent = str_replace('[br]','</br>', $getthethreadcontent); //html to bb $getthethreadcontent = htmlspecialchars($getthethreadcontent); $getthethreadcontent = str_replace('&lt;a href=&quot;','[url="', $getthethreadcontent); $getthethreadcontent = str_replace('&quot;&gt;','"]', $getthethreadcontent); $getthethreadcontent = str_replace('&lt;/a&gt;','[/url]', $getthethreadcontent); $getthethreadcontent = str_replace('&lt;/br&gt;','[br]', $getthethreadcontent);
  15. Hello everyone, I am currently developing a forum and we decided to use a html editor to post threads at first. We have changed our minds and decided that we only want to allow BB code. So we have bb codes for like bold, italic, new line. horizontal line etc. So we want to add something above the text area. Like a button with a B I or underscored U on the top of this html editor. And when the user clicks on the B for example, it should add to the textarea. I think this could be done with javascript? My textarea on the edit thread page: <a href="#"">Bold </a> // So when the user clicks this, it should add [b][/b] to the end of the textarea below without changing the content that is already in the textarea. <textarea id="editor1" name="editor1EDIT" rows="10" cols="80">'.$getthethreadcontent.'</textarea> Im really a noob at javascript so any advice on how to do this would be helpful. If there are any other methods then javascript i am willing to hear it.
  16. Thank you for your response. Stripos is actually really a thing. The difference between strpos and stripos is that stripos doesnt look for case-sensitivity. https://www.w3schools.com/php/func_string_stripos.asp While using strpos, bender would not find Bender from the database. With stripos it would. Looking at your example of strpos made me realize i did it wrong. I had this: if( stripos($searchinputfinal, $row["USERNAME"]) !== false) While they should be switched like this: stripos($row["USERNAME"], $searchinputfinal) !== false) It is working fine now. Thanks for the help.
  17. ChubbyKakert posted a topic in Server Side
    Hi, I have a problem with using stripos to check if a string contains the input of the user. So lets say the username is Bender. It only works when i type "bender" or "bender". What i want it to do is that if you type Ben, that it will still show Bender. This is my code: if( stripos($searchinputfinal, $row["USERNAME"]) !== false) { //It only works when i type "bender" or "bender" doesn't work if i type ben . } Is stripos not supposed to be used for this or am i doing something wrong?
  18. Hello there and welcome, Its a good decision to start with HTML, CSS and Javascript. What you also should look into is php and SQL. Wether this should be MySQL or SQLite is up to you but most people use MySQL for bigger projects. SQLite is as far as i know used for small projects. With HTML and CSS you are only basically get to design the layout, how the website looks. Which text it has and more etc. But with PHP and SQL you will make it functional. For example, imagine a contact form. The form is build in html and will be process with php. SQL is a database management system and could be used to store the accounts of this website. Using php and sql you can register and read any data you want. Its simply to much to explain in a topic. About workflow, i use trello.com and it works pretty good.
  19. This topic can be closed. I have fixed this. I had the following somewhere in my code while it was not supposed to be there: if(!isset($_GET["page"] )) { header('Location: index.php?p=memberslist&page=1'); }
  20. Hi everyone. I have a memberlist on my website and we decided that we want to have a search on username function. Now this is giving me some odd outcomes even though i use the same method while searching for other things and it works. The problem is that when you enter a valid username from the database the following code doesn't get called at all: if(isset($_POST['SEARCHINPUT'])) { // Everything between here does not get called when you enter a valid username } When you enter a username that doesn't exist in the database. It gets called... What could be the problem here? May you want to test it out for yourself: http://losangeles-roleplay.org/index.php?p=memberslist Username: tester123 Password: 12345678 More code: if (isset($_GET["a"] )) { $pagea = $db->escapeString($_GET["a"]); if($pagea == "search") { echo '<h1>Members List - Search on Username</h1> <table style="width:30%;border:0px;" align="right" border="0"> <tr style="border:0px;"> <td style="border:0px;"> <form method="post" action="'.$_SERVER['PHP_SELF'].'"> <input class="input100" type="text" style="width:220px;height:50px;" name="SEARCHINPUT" placeholder="Search On Username" pattern=".{2,}" required title="Your input should contain at least 3 characters"> </td> <td style="border:0px;"> <input type="image" src="images/search.png" style="width:40px;height:40px;" alt="Submit" /> </form> </td> </tr> </table>'; if(isset($_POST['SEARCHINPUT'])) { $searchinputfinal = $db->escapeString($_POST['SEARCHINPUT']); $countusers = 0; $countuserq = "SELECT * FROM USERS WHERE USERNAME LIKE '$searchinputfinal'"; $countuserstmt = $db->query($countuserq); while($rowcountuser = $countuserstmt->fetchArray(SQLITE3_ASSOC)) { $countusers += 1; } $limit = 10; $countusers = SqliteNumRows($countuserstmt); $total_pages = ceil($countusers / $limit); $record_index= ($page-1) * $limit; echo "Showing ".$countusers." results for: ".$_POST['SEARCHINPUT'].""; $sql = "SELECT * FROM USERS WHERE USERNAME LIKE '$searchinputfinal' LIMIT $record_index, $limit"; $stmt = $db->query($sql); } } } else { echo '<h1>Members List</h1> <table style="width:30%;border:0px;" align="right" border="0"> <tr style="border:0px;"> <td style="border:0px;"> <form method="post" action="index.php?p=memberslist&a=search"> <input class="input100" type="text" style="width:220px;height:50px;" name="SEARCHINPUT" placeholder="Search On Username" pattern=".{2,}" required title="Your input should contain at least 3 characters"> </td> <td style="border:0px;"> <input type="image" src="images/search.png" style="width:40px;height:40px;" alt="Submit" /> </form> </td> </tr> </table>'; $countusers = 0; $countuserq = "SELECT * FROM USERS"; $countuserstmt = $db->query($countuserq); while($rowcountuser = $countuserstmt->fetchArray(SQLITE3_ASSOC)) { $countusers += 1; } $limit = 10; $countusers = SqliteNumRows($countuserstmt); $total_pages = ceil($countusers / $limit); $record_index= ($page-1) * $limit; $sql = "SELECT * FROM USERS ORDER BY random() LIMIT $record_index, $limit"; $stmt = $db->query($sql); }
  21. Thank you very much. It looks a little confusing to me still. I have to read about it. Gonna try it and may come back here later.
  22. May u not have a budget to spend then you could also look into . I have used this alot back in the days and its really free. It doesnt overload the user with ads either. They also have a premium package but the free host is pretty good for starting devs.
  23. Hi everyone, I am the owner of some kind of mmorpg. We are currently creating a new website which also includes a new shop. With this shop players should be able to purchase gamecoins and spend them. They could top up their gamecoins wallet etc. Now on the previous website. We used a simple paypal donation where the player had to wait a long time before the coins would be cashed. We now want to make this automated. Player selects amount of gamecoins they want to buy, they pay and come back to the website. When they return to the website their obviously should be a check if the payment was done. Im totally stuck at this. How would i realize this? I have php and SQL knowledge and can absolutely create the part of the shop with shopping carts and the part that adds the gamecoins, but how to check if the user has paid etc?
  24. @fisicx The link you gave me has a method that doesn't work (anymore). I have searched a little and managed to find a working method: .hyphenate { /* Careful, this breaks the word wherever it is without a hyphen */ -ms-word-break: break-all; word-break: break-all; word-break: break-word; -webkit-hyphens: auto; -moz-hyphens: auto; hyphens: auto; } <p class="hyphenate">HyphenatedtextHyphenatedtextHyphenatedtextHyphenatedtextHyphenatedtextHyphenatedtext </p<

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.