Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> Jak wyświetlić te zmiennę ?
tytusiik
post 24.11.2013, 21:19:43
Post #1





Grupa: Zarejestrowani
Postów: 1
Pomógł: 0
Dołączył: 24.11.2013

Ostrzeżenie: (0%)
-----


Witam. Tworzę plugin do MyBB, który ma odczytać ze strony plik xml, przekształcić dane na zmienne i wyświetlić je w szablonie. Potrafię pobrać szablon xml lecz nie potrafię zamienić je w zmiennę. Wyglada to tak:

  1. function steam_info_index() {
  2. global $mybb, $thread, $data, $xml, $url, $feed, $templates, $steam_info_index;
  3.  
  4. $url = 'http://www.steamcommunity.com/groups/cswojna/memberslistxml/?xml=1';
  5. $xml = simplexml_load_file($url);
  6. //$classXML = new $loadclassXML($xml);
  7. //$feed = $classXML->loadXML( $xml );
  8. //$feed = simplexml_load_string( $xml );
  9.  
  10.  
  11. $data = array();
  12. $data['name'] = $feed->groupDetails->groupName;
  13. $data['avatar'] = $feed->groupDetails->avatarFull;
  14. $data['members'] = $feed->groupDetails->memberCount;
  15. $data['inchat'] = $feed->groupDetails->membersInChat;
  16. $data['ingame'] = $feed->groupDetails->membersInGame;
  17. $data['online'] = $feed->groupDetails->membersOnline;
  18. $data['details'] = $feed->groupDetails->summary;
  19. $data['url'] = $feed->groupDetails->groupURL;
  20. $data['id'] = $feed->groupID64;
  21. eval("\$steam_info_index = \"".$templates->get("steam_info_index")."\";");
  22. return $steam_info_index;
  23. }


Jak wyświetlić teraz podane wyżej zmienne?

Ten post edytował tytusiik 24.11.2013, 21:21:28
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 28.04.2024 - 08:51