Leaderboard: export code to portal + Board3 module

Forum dedicato allo script Safe GamerTag, che permette il display della usercard di XboX, Playstation 3, Nintento Wii.
Forum about Safe GamerTag scripts: display your XboX, Playstation 3, Nintento Wii usercard.

Leaderboard: export code to portal + Board3 module

Messaggioda Soshen » 02/09/2013, 15:06

I made this following the question of SwT-CarbonzZ or board3 portal
that you can found here:
safe-gamertag/board3-portal-integration-t1976.html


But this way is ok for all phpBB portal, or for include psn leaderboard data in other pages.


BOARD 3 modules

LATEST GAMES MODULE
Addon Requirements: Board3 Portal 2.x, Safe GamerTag and the addon PSN Leaderboard.
Download Link is:
ENG: http://www.nipponart.org/en/projects/vi ... on-en.html
ITA: http://www.nipponart.org/projects/view/ ... addon.html

You can put left/right/center/top. I suggest to put in top block.
In config you can edit how many games show.



LATEST UNLOCKED TROPHIES MODULE
Addon Requirements: Board3 Portal 2.x, Safe GamerTag and the addon PSN Leaderboard.
Download Link is:
ENG: http://www.nipponart.org/en/projects/vi ... on-en.html
ITA: http://www.nipponart.org/projects/view/ ... addon.html

You can put left/right/center. I suggest to put in side block.
In config you can edit how many trophies show, if display the logo image and is aspect ratio.


Immagine






GENERAL EXPORTER

Works with all phpBB portal and pages.

psn_exporter.php
psn exporter v2
(5.27 KiB) Scaricato 50 volte


1) upload the file psn_exporter.php in your root/safegt directory.



now go in php page where you want data will be displayed (eg. portal.php)

FIRST INCLUDE THE FILE
generally this is in first lines of page
Codice: Seleziona tutto
include($phpbb_root_path . 'safegt/psn_exporter.' . $phpEx);


at the end of page before page_footer(); if there are add one of those:

FOR ADD LATEST EARNED TROPHIES
Codice: Seleziona tutto
print_latest_earnedtrophies($trophy_num = 10, $onlytxt = false)

$trophy_num are the total of latest earned trophies that will be displayed. default 10
$onlytxt if are true the logo image dont appears. default false
eg. print_latest_earnedtrophies();
display latest 10 trophies with logo

print_latest_earnedtrophies(5,true);
display latest 4 trophies without logo

it generate a <ul> <li> html tag with all data
for make the style you can add in css definition for <ul class="latesttrophies">



LATEST GAMES ON DB
Codice: Seleziona tutto
print_latest_games($game_num = 10)

$game_num = set the games displayed. Default 10.

it generate a <ul> <li> html tag with all data
for make the style you can add in css definition for <ul class="latestgames">



LATEST GAMES ON DB
Codice: Seleziona tutto
print_latest_tips($tip_num = 10)

$tip_num = set the tips displayed. Default 10.

it generate a <ul> <li> html tag with all data
for make the style you can add in css definition for <ul class="latesttips">






Now for call them in template... where you want that they appears just add those code:

for latest trophies
Codice: Seleziona tutto
{DISPLAY_LATEST_TROPHIES}


for latest games
Codice: Seleziona tutto
{DISPLAY_LATEST_GAMES}


for latest tips
Codice: Seleziona tutto
{DISPLAY_LATEST_TIPS}
Vedi le mie collezioni
Avatar utente
Soshen
Site Admin
 
Messaggi: 1357
Iscritto il: 09/07/2010, 23:54
Nazionalità: Italy (it)
Numero MVP totali: 4
Gamername: Soshen

Re: Leaderboard: export code to portal.

Messaggioda SwT-CarbonzZ » 02/09/2013, 19:37

I added those 3 lines on mu portal.php = White Page

And where do you have to add the template files?

SwT-CarbonzZ
Amico di bevute
 
Messaggi: 267
Iscritto il: 19/02/2012, 13:00
Nazionalità: Belgium (be)
Numero MVP totali: Nessuno

Re: Leaderboard: export code to portal.

Messaggioda Soshen » 02/09/2013, 21:31

in html portal template in style...

i've tested it and i do not get white pages in phpbb index.

with debug on do you get some advices?

send me your portal php
Vedi le mie collezioni
Avatar utente
Soshen
Site Admin
 
Messaggi: 1357
Iscritto il: 09/07/2010, 23:54
Nazionalità: Italy (it)
Numero MVP totali: 4
Gamername: Soshen

Re: Leaderboard: export code to portal.

Messaggioda SwT-CarbonzZ » 03/09/2013, 19:55

Ok i send you portal.php now.

portal.php
Portal.php
(5.95 KiB) Scaricato 40 volte


Also ive tryed to add the html , but i need some examples of it how you did it.

SwT-CarbonzZ
Amico di bevute
 
Messaggi: 267
Iscritto il: 19/02/2012, 13:00
Nazionalità: Belgium (be)
Numero MVP totali: Nessuno

Re: Leaderboard: export code to portal.

Messaggioda Soshen » 03/09/2013, 21:37

like i wrote in first post
you must add only this
{DISPLAY_LATEST_TROPHIES}
Vedi le mie collezioni
Avatar utente
Soshen
Site Admin
 
Messaggi: 1357
Iscritto il: 09/07/2010, 23:54
Nazionalità: Italy (it)
Numero MVP totali: 4
Gamername: Soshen

Re: Leaderboard: export code to portal.

Messaggioda SwT-CarbonzZ » 04/09/2013, 6:36

Yes i know but where do you need to place it , thats why im asking to post your example here where you added it :)

SwT-CarbonzZ
Amico di bevute
 
Messaggi: 267
Iscritto il: 19/02/2012, 13:00
Nazionalità: Belgium (be)
Numero MVP totali: Nessuno

Re: Leaderboard: export code to portal.

Messaggioda Soshen » 04/09/2013, 9:24

html too please.
Vedi le mie collezioni
Avatar utente
Soshen
Site Admin
 
Messaggi: 1357
Iscritto il: 09/07/2010, 23:54
Nazionalità: Italy (it)
Numero MVP totali: 4
Gamername: Soshen

Re: Leaderboard: export code to portal.

Messaggioda SwT-CarbonzZ » 04/09/2013, 11:05

I cant send it now because im not @ home im @ work for 5 more hours. So i d'ont know if you are online tonigth on skype , but if you can you can send me your html file just for example and i edit mine after.

SwT-CarbonzZ
Amico di bevute
 
Messaggi: 267
Iscritto il: 19/02/2012, 13:00
Nazionalità: Belgium (be)
Numero MVP totali: Nessuno

Re: Leaderboard: export code to portal.

Messaggioda Soshen » 04/09/2013, 11:50

I've downloaded the BOARD3 2.0.1

in portal.php i add the function with default values and i've included the file.

so

i've added after
Codice: Seleziona tutto
include($phpbb_root_path . $portal_root_path . 'includes/functions.' . $phpEx);


this
Codice: Seleziona tutto
// SAFEGT START
include($phpbb_root_path . 'safegt/psn_exporter.' . $phpEx);
// SAFEGT END


then

before
Codice: Seleziona tutto
page_footer();


this

Codice: Seleziona tutto
// SAFEGT START
print_latest_earnedtrophies();
print_latest_games();
print_latest_tips();
// SAFEGT END






in template file where you want to display just add the code above.

for example if you want the latest unlocked trophies in right column you can edit the stats box
that is

statistics_side.html

(you can find in styles / prosilver / template / portal directory)



just ad on top of bottom original code something

Codice: Seleziona tutto
<!-- SAFEGT START -->
{$LR_BLOCK_H_L}{L_LATEST_UNLOCKED_TROPHIES}{$LR_BLOCK_H_R}
   {DISPLAY_LATEST_TROPHIES}
{$LR_BLOCK_F_L}{$LR_BLOCK_F_R}
<!-- SAFEGT END -->


tell me if work cose i don't have tested it.
Vedi le mie collezioni
Avatar utente
Soshen
Site Admin
 
Messaggi: 1357
Iscritto il: 09/07/2010, 23:54
Nazionalità: Italy (it)
Numero MVP totali: 4
Gamername: Soshen

Re: Leaderboard: export code to portal.

Messaggioda SwT-CarbonzZ » 04/09/2013, 17:30

Ive did this and i get every latest game twice showing and under each other im was using the welcome block. The latest trophies was not working , tips did not tryed.

SwT-CarbonzZ
Amico di bevute
 
Messaggi: 267
Iscritto il: 19/02/2012, 13:00
Nazionalità: Belgium (be)
Numero MVP totali: Nessuno

Prossimo

Torna a Safe GamerTag

Chi c’è in linea

Visitano il forum: Nessuno e 1 ospite

cron