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.

LukeeeeBennett

Members
  • Joined

  • Last visited

Everything posted by LukeeeeBennett

  1. Hello, I was recently working on some code and I realised that I would like a foreach of a foreach, but I couldn't quite work it out. I did what made sense to me but I didn't get much returned. Let me show you. So my original code was the following; <?php $Member = '/*member's name*/'; $GetMemberData = file_get_contents('/*file containing the member info*/' . $Member); $DataReturned = json_decode($GetMemberData); foreach ($DataReturned as $Returned) { echo $Returned->viewers.'<br>'; echo $Returned->members->game.'<br>'; echo $Returned->members->status.'<br>'; } ?> and this is good. It returns the information of the member correctly. However, I realised I would much prefer to turn the $Member variable to be an array for multiple members so that it would display the "Viewers", "Game" and "Status" of multiple members one after each other on the same page instead of me having to copy the WHOLE code out and keep replacing the member's name as I assume that would slow the page down dramatically. So I tried to just logically have a stab at it and arrived at the code below, but it didn't work. Hopefully someone here can help me out? <?php $MemberArray = array('member1','member2','member3'); foreach ($MemberArray as $Member) { $GetStreamData = file_get_contents('https://api.twitch.tv/kraken/streams/' . $Member); } foreach ($GetStreamData as $GetStreamData000) { $DataReturned = json_decode($GetStreamData000); } foreach ($DataReturned as $Returned) { echo $Returned->viewers . '<br>'; echo $Returned->channel->game . '<br>'; echo $Returned->channel->status . '<br>'; } ?>
  2. Hey, So I've been working for a LONG time on a vBulletin site and to be perfectly honest I've had enough of its horrific UX design and it seems to make the simplest of tasks the hardest. If you look towards http://syskily.com/lzhtv/index2.php (My test server) you'll notice it displays a number (currently "16545" but will change depending on how many people are watching a certain video, could reach 0 at some points) The code: <?php $streamData = json_decode(file_get_contents("http://api.justin.tv/api/stream/summary.json?channel=PhantomL0rd"),true); $viewers = $streamData['viewers_count']; echo "$viewers"; ?> You'll see this is very simple, it just grabs the number of viewers viewing a certain stream channel and then echos it out. My test server executes this perfectly with no issues. However, I apply the same code to a vBulletin page: and suddenly its an issue. When saving that page edit I receive: and when I try to view that page I get no viewer count echo and just receive: Could anyone help me out?
  3. Doesn't look like this? http://i.imgur.com/FNUOb.jpg Needs to be absolute positioning.
  4. I code using Chrome to preview my changes. If you go to http://mylzh.net/content.php?196 in chrome, you see it's all ordered. However, if you visit the same link in Firefox, the sideways grey boxes are all on top of each other and I have no idea why. I understand in some cases that you need to add certain codes to make firefox behave, but the only codes I've used in this is position, padding, margin, all those simple ones. I don't understand why firefox wouldn't recognise that.
  5. Hello, I'm making a sortable table here: http://mylzh.net/content.php?196 and if you see, when you sort a column, for a short amount of time you can't scroll up without being kicked back down. Is there a way to stop this happening? - Luke
  6. Sure, the code is: <?php $stream = $_GET['stream']; $streamData = json_decode(file_get_contents("http://api.justin.tv/api/stream/summary.json?channel={$stream}"),true); $viewers = $streamData['viewers_count']; echo $viewers; ?>
  7. Hey, I've got a PHP file that outputs text, it shows how many people are watching a video, for example, "3286". Example: http://mylzh.net/stream/viewers.php?stream=kungentv Example 2: http://mylzh.net/stream/viewers.php?stream=tsm_theoddone It keeps changing. I have another PHP file that displays an image to show if that video is online or offline. For example: http://mylzh.net/stream/stream.php?stream=tsm_theoddone (Green if online, Red if offline) I can take that image from that file into the HTML easily with <img src="http://mylzh.net/stream/stream.php?stream=tsm_theoddone"> but how could I get the text into the HTML file? Thanks, - Luke
  8. Hello, I need to make a stream list like this: http://www.lolking.net/streams where it will pull streams from twitch.tv and show who is online/offline and how many viewers. I recognised that I need to use an API to build such a page which I found here: https://github.com/justintv/Twitch-API/blob/master/resources/streams.md However I'm now stumped with what to do. I recognise that if I wanted all the information for the stream channel "GameSpot" for example I can type in https://api.twitch.tv/kraken/streams?channel=GameSpot and it shows all the information. BUT, how do I use this in my own website? First time with APIs. Not sure what language I'm meant to be using. If anyone could help me out I'd be so happy. Thanks, - Luke
  9. I noticed on this site http://www.soleysoley.com/ that there is a huge image on the background that stays in places no matter how zoomed your page is etc. I'd quite like to do this for a site I'm having a mess with and I was wondering the steps to execute this?
  10. Hey, You guys have helped me a lot in the past, so wanted to come here for more. I wanted to make a live stream page that has multiple links to live streams but orders them in how many viewers they each have and doesn't show them if the stream isn't currently live. Here is an example: http://www.lolking.net/streams Another example: http://www.solomid.net/streams.php Any help like this would be awesome. I believe I know how to do it like it is in the first link, but I'm not sure how to separate the online and offline ones.
  11. Hey, I wanted to include something on my wordpress/phpbb site where users could sign up and create guides, then other users can vote on it, comment on it etc. I was wondering if you could point me in the right direction to finding a system/script/plugin/mod that would do this? Examples: http://www.teamparad...t/guides http://www.lolpro.com/guides http://www.solomid.n...ides.php http://www.gw2build.com/builds
  12. I found a fix. I added a padding-bottom to the top <li>.
  13. Aye, I've noticed the same thing. Quite an annoying problem. I really want to keep it in the current position. Hmmmmm.
  14. Hello, I have a few issues with a nav bar. http://mylzh.net As you can see, the drop downs appear, but because they're positioned down from the buttons, it disapears by the time you try to use the drop down links. How can I fix this? Also, how would I make the last link have a border-radius? I can't see to get that done either. HTML: <div id="nav"> <ul id="jsddm"> <li><a href="http://mylzh.net/content.php"><!--BACK UP START-->HOME<!--BACK UP END--></a></li> <li> <a href="#">COMMUNITY</a> <ul> <li><a href="http://mylzh.net/arcade.php">Arcade</a></li> <li><a href="http://mylzh.net/content.php?1015">Guides</a></li> <li><a href="http://mylzh.net/content.php?193-Social-Networks">Social Networks</a></li> <li><a href="http://mylzh.net/content.php?126-lzhwiki">Lzuruha Wiki</a></li> <li><a href="http://mylzh.net/content.php?185-Voice-Servers">Voice Servers</a></li> <li class="last"><a href="http://mylzh.net/content.php?638-Game-Servers">Game Servers</a></li> </ul> </li> <li> <a>PORTALS</a> <ul> <li><a href="http://mylzh.net/content.php?388-battlefield">Battlefield 3</a></li> <li><a href="http://mylzh.net/content.php?248-cod_news">Call Of Duty: Modern Warfare 3</a></li> <li><a href="http://mylzh.net/content.php?246-starcraft_2_news">StarCraft II: Heart of the Swarm</a></li> <li><a href="http://mylzh.net/content.php?249-cs_news">Counter-Strike: Source</a></li> <li><a href="http://mylzh.net/content.php?341-d3_news">Diablo III</a></li> <li><a href="http://mylzh.net/content.php?252-lol_news">League Of Legends</a></li> <li><a href="http://mylzh.net/content.php?387-minecraft_news">MineCraft</a></li> <li><a href="http://mylzh.net/content.php?250-rift_news">Rift: Planes of Telara</a></li> <li><a href="http://mylzh.net/content.php?815">Dota 2</a></li> <li><a href="http://mylzh.net/content.php?614-starwar_news">Star Wars: The Old Republic</a></li> <li><a href="http://mylzh.net/content.php?247-warcraft_news">World of WarCraft: Mists of Pandaria</a></li> </ul> </li> <li> <a>TEAM</a> <ul> <li><a href="http://mylzh.net/showgroups.php">Staff & Players</a></li> <li><a href="http://mylzh.net/application-forms.php?appid=1">Apply to the Team</a></li> <li><a href="http://mylzh.net/content.php?179-Achievements">Team Achievements</a></li> <li><a href="http://mylzh.net/forumdisplay.php?112-Report-a-Player">Report a Player</a></li> </ul> </li> <li class="middle_pusher"><a href="http://mylzh.net/content.php?195-About-Us">ABOUT</a> <ul> <li><a href="http://mylzh.net/content.php?182-LzH-in-the-Community">In The Community</a></li> <li><a href="http://mylzh.net/content.php?181-Sponsors">Sponsors & Partners</a></li> <li><a href="http://mylzh.net/sendmessage.php">Contact Us</a></li> <li><a href="http://mylzh.net/content.php?189-Donate">Donate</a></li> </ul> </li> <li> <a href="http://mylzh.net/competitions.php">EVENTS</a> <ul> <li><a href="http://mylzh.net/tournaments.php">Tournaments</a></li> <li><a href="http://mylzh.net/ladders.php?showonly=leagues">Leagues</a></li> <li><a href="http://mylzh.net/ladders.php?showonly=ladders">Ladder</a></li> </ul> </li> <li> <a>LZHTV</a> <ul> <li><a href="http://mylzh.net/content.php?196-Streams">Streams</a></li> <li><a href="http://mylzh.net/media.php">Video on Demand </a></li> </ul> </li> <li> <a>LZHCLUB</a> <ul> <li><a href="http://mylzh.net/forumdisplay.php?128-LzH-Club-Room">Club Forums</a></li> <li><a href="http://mylzh.net/forumdisplay.php?130-LzH-Club-Download-Video">Club Videos</a></li> </ul> </li> <li><a href="http://mylzh.net/content.php?187-Store">STORE</a></li> <li><a href="http://mylzh.net/forum.php">FORUMS</a></li> </ul> </div> CSS: #jsddm { margin: 0; padding: 0; height: 1em; } #jsddm li { list-style: none; float: left; } #jsddm li.middle_pusher { padding-right:260px;} #jsddm li a { display: block; padding: 3px 8px; color: #fff; font-size:20px; text-decoration: none; padding-right:15px; text-shadow:1px 1px black;} #jsddm li ul { display: none; width: 10em; /* Width to help Opera out */ background-color: #FFF; position:relative; top:39px; } #jsddm li:hover ul, #navbar li.hover ul { display: block; position: absolute; margin: 0; padding: 0; } #jsddm li:hover li, #navbar li.hover li { float: none; } #jsddm li:hover li a, #navbar li.hover li a { background-color: #FFF; border-bottom: 1px solid #fff; color: #000; } #jsddm li li a:hover { background-color: #8db3ff; } #jsddm li ul li a { font-size:16px; text-shadow:none !important; } #jsddm li ul li.last{ -moz-border-radius: 0px 5px 5px 5px; -webkit-border-radius: 0px 5px 5px 5px; border-radius: 0px 5px 5px 5px; }
  15. Yeah, I never use visibility, but this website was handed to me in a job after 2 others had been working on it and they're both very inexperienced. :/ That's for the links, I'll come back if no help.
  16. I'm making a site and the drop-down menu I've coded doesn't seem to be dropping down. Could anyone help? LINK: www.mylzh.net HTML: <div id="nav"> <ul id="jsddm"> <li><a href="http://mylzh.net/content.php"><!--BACK UP START-->HOME<!--BACK UP END--></a></li> <li> <a>COMMUNITY</a> <ul> <li><a href="http://mylzh.net/arcade.php">Arcade</a></li> <li><a href="http://mylzh.net/content.php?1015">Guides</a></li> <li><a href="http://mylzh.net/content.php?193-Social-Networks">Social Networks</a></li <li><a href="http://mylzh.net/content.php?126-lzhwiki">Lzuruha Wiki</a></li> <li><a href="http://mylzh.net/content.php?185-Voice-Servers">Voice Servers</a></li> <li><a href="http://mylzh.net/content.php?638-Game-Servers">Game Servers</a></li> </ul> </li> <li> <a>PORTALS</a> <ul> <li><a href="http://mylzh.net/content.php?388-battlefield">Battlefield 3</a></li> <th><li><a href="http://mylzh.net/content.php?248-cod_news">Call Of Duty: Modern Warfare 3</a></li> <li><a href="http://mylzh.net/content.php?246-starcraft_2_news">StarCraft II: Heart of the Swarm</a></li> <li><a href="http://mylzh.net/content.php?249-cs_news">Counter-Strike: Source</a></li> <li><a href="http://mylzh.net/content.php?341-d3_news">Diablo III</a></li> <li><a href="http://mylzh.net/content.php?252-lol_news">League Of Legends</a></li> <li><a href="http://mylzh.net/content.php?387-minecraft_news">MineCraft</a></li> <li><a href="http://mylzh.net/content.php?250-rift_news">Rift: Planes of Telara</a></li> <li><a href="http://mylzh.net/content.php?815">Dota 2</a></li> <li><a href="http://mylzh.net/content.php?614-starwar_news">Star Wars: The Old Republic</a></li> <li><a href="http://mylzh.net/content.php?247-warcraft_news">World of WarCraft: Mists of Pandaria</a></li> </ul> </li> <li> <a>TEAM</a> <ul> <li><a href="http://mylzh.net/showgroups.php">Staff & Players</a></li> <li><a href="http://mylzh.net/application-forms.php?appid=1">Apply to the Team</a></li> <li><a href="http://mylzh.net/content.php?179-Achievements">Team Achievements</a></li> <li><a href="http://mylzh.net/forumdisplay.php?112-Report-a-Player">Report a Player</a></li> </ul> </li> <li class="middle_pusher"><a href="http://mylzh.net/content.php?195-About-Us">ABOUT</a> <ul> <li><a href="http://mylzh.net/content.php?182-LzH-in-the-Community">In The Community</a></li> <li><a href="http://mylzh.net/content.php?181-Sponsors">Sponsors & Partners</a></li> <li><a href="http://mylzh.net/sendmessage.php">Contact Us</a></li> <li><a href="http://mylzh.net/content.php?189-Donate">Donate</a></li> </ul> </li> <li> <a href="http://mylzh.net/competitions.php">EVENTS</a> <ul> <li><a href="http://mylzh.net/tournaments.php">Tournaments</a></li> <li><a href="http://mylzh.net/ladders.php?showonly=leagues">Leagues</a></li> <li><a href="http://mylzh.net/ladders.php?showonly=ladders">Ladder</a></li> </ul> </li> <li> <a>LZHTV</a> <ul> <li><a href="http://mylzh.net/content.php?196-Streams">Streams</a></li> <li><a href="http://mylzh.net/media.php">Video on Demand </a></li> </ul> </li> <li> <a>LZHCLUB</a> <ul> <li><a href="http://mylzh.net/forumdisplay.php?128-LzH-Club-Room">Club Forums</a></li> <li><a href="http://mylzh.net/forumdisplay.php?130-LzH-Club-Download-Video">Club Videos</a></li> </ul> </li> <li><a href="http://mylzh.net/content.php?187-Store">STORE</a></li> <li><a href="http://mylzh.net/forum.php">FORUMS</a></li> </ul> </div> CSS: #nav { position: relative; top: 173px; left:-80px; margin-left: auto; margin-right:auto; z-index: 1; width:1300px; } #jsddm { margin: 0; padding: 0; z-index: 10000; list-style:none; } #jsddm li { float: left; font: 12px Arial, sans-serif; padding-right:5px; text-align:center; } #jsddm li.middle_pusher { padding-right:280px; } #jsddm li a { display: block; text-decoration: none; border-right: 0px solid white; width: auto; color: #FFF; padding-right:10px; text-shadow: 1px 1px 1px #000; font-size:18px; } #jsddm li ul { margin: 0px; padding: 0px; position: absolute; visibility: hidden; border-top: 20px solid #008DAB; border-right: 1px solid #008DAB; border-bottom: 1px solid #008DAB; border-left: 1px solid #046FA3; z-index: 10000; } #jsddm li ul li { float: none; display: inline; z-index: 10000; } #jsddm li ul li a { width: auto; background: #07182A; padding: 4px; z-index: 10; } #jsddm li ul li a:hover { background: #046FA3; z-index: 10; }
  17. £450ish http://www.ebay.co.uk/itm/Toshiba-C660-2JT-Intel-Core-i5-4GB-RAM-500GB-Harddrive-Notebook-PC-/200744019325?_trksid=p3286.m7&_trkparms=algo%3DLVI%26itu%3DUCI%26otn%3D3%26po%3DLVI%26ps%3D63%26clkid%3D7767105026087197409#ht_3097wt_1185 ?
  18. Hey, I'm going to Uni at the end of this year and have decided to get a laptop to make study easier but also to keep my graphic and web design all with me so I don't have to wait to get to my dorm to continue work. I'm heaving graphics based and have always used a pretty crappy computer, but I was wondering if any of you could recommend decent priced laptops that can run really big photoshop and illustrator files well? Cheers.
  19. Yeah, I have the fix. Had to use the background-color:rgba code.
  20. I'm working on a site and would like to put a background image on top of the pattern background and then lower the opacity of it. I've managed to place the image ontop of the background but when I lower the opacity it all of a sudden appears above all of the page elements and content. How can I stop this? :S http://monoesports.com/wp/ Edit: Looking again, it just makes the content transparent also instead of being on top.. :S
  21. Thanks so much Paul. Would you say this is a hard ting to learn? I've dabbled in PHP but never full on "studied" it.
  22. Hey, I'm making a site and I want it to have a feature that I believe isn't achievable with just HTML. I want to have a form where someone enters their name, email address and then chooses a "group" to join. Each group will have 15 spaces but I want each person to get a random number in the group (1 to 15) when they hit the join button to join that group. Then the next second after they hit "confirm" it adds their name into a random position (1-15) in the group they chose. So my question is this; What coding language do I use for this? What sort of feature in the language am I looking for? I need a language that takes the contents of a form and then adds them to a table/creates the content itself. Thanks a ton.
  23. Hello, I'd like to round the top edges of a coded box that I've made. Is this possible? Thanks, - Luke
  24. Hmm, still stop-starting. :/

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.