Jump to content
  • 0
Daniel H.

Problema citire cod php in ipb

Question

Salutare. In seara asta am vrut sa introduc un script php prin blocks de la sectiunea page management. Am facut totul la carte, am inserat manual scriptul, am selectat ca totul sa fie citit php dar pana la urma el nu il citeste corect si arata asa: https://prnt.sc/idsnmb

tin sa mentionez ca nu functioneaza nici efectul de hover, nici nu apar toate cele ce trebuie

codul este urmatorul: 

$groupname = "p0wergame";
$xml = simplexml_load_file("http://steamcommunity.com/groups/".$groupname."/memberslistxml/?xml=1");
foreach ($xml->groupDetails->groupName as $name) {}
foreach ($xml->groupDetails->avatarFull as $icon)
 echo "<div class='dpx-steamSidebar'>";
		{ echo "<div class='dpx-steamSidebar-avatar' style='background-image: url($icon);'>
          <div class='dpx-steamSidebar-avt-radials'>
            <svg class='dpx-sa-rad2'>
  				<circle cx='50' cy='50' r='40'></circle>
			</svg>
            <svg class='dpx-sa-rad1'>
  				<circle cx='50' cy='50' r='40'></circle>
			</svg>
          </div>
        </div>"; }
		  echo "<div class='uk-grid'>";
		  echo "<div class='dpx-steamSidebar-name'> $name </div>";
foreach ($xml->groupDetails->memberCount as $member)
		{ echo " <div class='dpx-steamSidebar-stat'> Members <div class='dpx-steamSidebar-stat-num'> $member </div> </div>"; }
foreach ($xml->groupDetails->membersInGame as $ingame)
		{ echo "<div class='dpx-steamSidebar-stat'> In Game <div class='dpx-steamSidebar-stat-num'> $ingame </div> </div>"; }
foreach ($xml->groupDetails->membersOnline as $online)
		{ echo "<div class='dpx-steamSidebar-stat'> Online <div class='dpx-steamSidebar-stat-num'> $online </div> </div>"; }
		  echo "<a href='http://steamcommunity.com/groups/".$groupname."/' class='dpx-steamSidebar-button'>VIEW AND JOIN</a>";
		  echo "</div>";
		   echo "</div>";

daca vreti live, aveti forumul: LINK

Putin ajutor va rog, dau funda:) 

Share this post


Link to post
Share on other sites

9 answers to this question

Recommended Posts

  • 0

Nu este scriptul dopePX doar de design ii fct de dopepx il postasi eu pe undeva faza era ca trebuie sa cauti extensia de la php

de ex:

<php>

<?php

Edited by Sn!k3rs

Share this post


Link to post
Share on other sites
  • 0
5 minutes ago, Sn!k3rs said:

Nu este scriptul dopePX doar de design ii fct de dopepx il postasi eu pe undeva faza era ca trebuie sa cauti extensia de la php

de ex:

<php>

<?php

Esti culmea, eu am șters acele doua linii fiindcă ipb ul nu mi le a mai cerut. 

Share this post


Link to post
Share on other sites
  • 0

La al doilea foreach ai un statement si apoi o pereche de acolade care n'au niciun sens pentru ca fiecare iteratie la foreach o sa iti execute doar echo'ul ala. sigur nu trebuia acolada aia { imediat dupa foreach?

Share this post


Link to post
Share on other sites
  • 0
16 hours ago, Daniel H. said:

 


$groupname = "p0wergame";
$xml = simplexml_load_file("http://steamcommunity.com/groups/".$groupname."/memberslistxml/?xml=1");
foreach ($xml->groupDetails->groupName as $name) {}
foreach ($xml->groupDetails->avatarFull as $icon)
 echo "<div class='dpx-steamSidebar'>";
		{ echo "<div class='dpx-steamSidebar-avatar' style='background-image: url($icon);'>
          <div class='dpx-steamSidebar-avt-radials'>
            <svg class='dpx-sa-rad2'>
  				<circle cx='50' cy='50' r='40'></circle>
			</svg>
            <svg class='dpx-sa-rad1'>
  				<circle cx='50' cy='50' r='40'></circle>
			</svg>
          </div>
        </div>"; }
		  echo "<div class='uk-grid'>";
		  echo "<div class='dpx-steamSidebar-name'> $name </div>";
foreach ($xml->groupDetails->memberCount as $member)
		{ echo " <div class='dpx-steamSidebar-stat'> Members <div class='dpx-steamSidebar-stat-num'> $member </div> </div>"; }
foreach ($xml->groupDetails->membersInGame as $ingame)
		{ echo "<div class='dpx-steamSidebar-stat'> In Game <div class='dpx-steamSidebar-stat-num'> $ingame </div> </div>"; }
foreach ($xml->groupDetails->membersOnline as $online)
		{ echo "<div class='dpx-steamSidebar-stat'> Online <div class='dpx-steamSidebar-stat-num'> $online </div> </div>"; }
		  echo "<a href='http://steamcommunity.com/groups/".$groupname."/' class='dpx-steamSidebar-button'>VIEW AND JOIN</a>";
		  echo "</div>";
		   echo "</div>";

 

Mutasem acolada aia dar nu mai funcționează deloc, dacă ai putea sa modifici și sa mi lași aici.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Recently Browsing   0 members

    No registered users viewing this page.

×