Jump to content
  • 0

Post su un sito esterno


Stefano Costantini

Question

Ciao a tutti, avrei la necessità di modificare il template per aggiungere un bottone che faccia un POST con alcuni parametri presi dalla sessione:

- id utente
- id del gruppo di appartenenza

Dite che è fattibile? Se sì mi date qualche dritta? :)

Link to comment
Share on other sites

10 answers to this question

Recommended Posts

  • 0
  • Admin

Ciao Stefano, tutto è fattibile e credo proprio che questo plugin possa aiutarti nel creare un blocco con php:

Screen_Shot_2015-03-13_at_5.19.08_PM.thu
INVISIONCOMMUNITY.COM

This mod will let you add Text, HTML and PHP widget IPS4s blocks. also you can disable PHP widget from Admin CP How To Install You just need install the plugin Admin CP System Site Features Plugins Install

 

Questi dati dove andranno? via email a te, database o dove? Magari @BomAle può aiutarti maggiormente in queste cose

Link to comment
Share on other sites

  • 0

Ottimo. Questi dati andranno postati su una pagina web. Ora che ho il plugin c'è un elenco delle variabili php definite in invision? 

Link to comment
Share on other sites

  • 0
  • Admin
8 minuti fa, Stefano Costantini ha scritto:

Ora che ho il plugin c'è un elenco delle variabili php definite in invision? 

Ovviamente, ricordati di includere il file init.php però.

Qui trovi una lista grezza:

og.jpg.5e6c57e8dfa140ce4ac18f1e757d3b45.
INVISIONCOMMUNITY.COM

If you are developing for 4.0 you will almost certainly need to interact with member accounts at some point. Thankfully, doing so is easy in 4.0. The primary member class in 4.0 is \IPS\Member. /* Get the...

 

Per questo esempio:

Cita

- id utente

Credo che la seguente stringa sia più che sufficiente:

\IPS\Member::loggedIn()->member_id

 

Link to comment
Share on other sites

  • 0

Quindi, se ho capito bene, una cosa di questo tipo?

 

<?php

include 'home/forum/init.php';

$prova = \IPS\Member::loggedIn();

echo "benvenuto ".$prova;

?>

Non va:

Cannot declare class IPS\IPS, because the name is already in use in home/forum/init.php on line 16

Link to comment
Share on other sites

  • 0
  • Admin
<?php

include 'home/forum/init.php';
\IPS\Session\Front::i();

$prova = \IPS\Member::loggedIn()->name;

echo "benvenuto ".$prova;

?>

 

Link to comment
Share on other sites

  • 0

Stesso errore :(

Fatal error: Cannot declare class IPS\IPS, because the name is already in use in ...

Link to comment
Share on other sites

  • 0
  • Admin
22 minuti fa, Stefano Costantini ha scritto:

Stesso errore :(

Fatal error: Cannot declare class IPS\IPS, because the name is already in use in ...

Strano, nel mio progetto uso così e funziona, prova con

require_once('home/forum/init.php');

 

  • Like 1
Link to comment
Share on other sites

  • 0

Grande! Così funziona!

 

Edited by Stefano Costantini
Link to comment
Share on other sites

  • 0
  • Admin
32 minuti fa, Stefano Costantini ha scritto:

Ciao! Con la 4.7 questo plugin non va più :(

Ce ne sono altri simili? :)

Ciao, ti riferisci al plugin TXT & PHP widget? Attualmente no..., potresti crearlo tu dal template come ho fatto io con il countdown per questo utente:

 

Link to comment
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.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. to insert a cookie message.