FusionBB
FusionBB Review (large)
Recent Members
Welcome them to our community!
FusionBB SWAG!

FusionBB golf shirts, t-shirts, mousepads and more.

Recent Topics
Tagging
FusionBBDev Recent Topics
Username Post: php particle box help        (Topic#11103)
bouche
FusionBB Addict
Total Posts: 789
*
Location: Gatineau, QC
Average Post Ranks%:                       
03-15-09 10:49 PM - Post#80758    



I'm playing with the twitter api and I'm trying to add a particle box for posting to twitter.

In the php code section for a particle box, is the following code valid? Can we include files from the particle?

Code:

      include_once('twitter.php'); if (!empty($session->uid)) { $curTwitter = new twitter("username""password"); if (isset($_POST['submit'])) {     $twitter_status $_POST['twitter_stat'];          if (strlen($twitter_status) > 0) {         if( $curTwitter->setStatus($twitter_status) == true)             echo "<p>Updated Succesfully</p>";         else             echo "<p>Sorry but Twitter is unavailable at this time</p>";     else         echo "<p>Error: We won't send blank messages!</p>"; }    





here's my form code....basic stuff really.

Code:

     <h2>Tell Twitter</h2> <p><strong>What are you doing?</strong></p>     <form action=" echo $_SERVER['PHP_SELF']; " method="post">         <input name="twitter_stat" type="text" id="twitter_stat" size="40" maxlength="140" />         <input type="submit" name="submit" id="submit" value="Send"/>     </form



Jambands.ca
Come waste your time with us.
Follow me on Twitter!


 
bouche
FusionBB Addict
Total Posts: 789
*
Location: Gatineau, QC
Average Post Ranks%:                       
03-18-09 10:13 AM - Post#80823    


    In response to bouche

erm....did anyone have any thoughts at all about this? I really have nowhere else to turn.
Jambands.ca
Come waste your time with us.
Follow me on Twitter!


 
Couchtomatoe
Code Monkey
Total Posts: 3049
*
Birthday: 02-03 
Location: Richmond, Virginia
Average Post Ranks%:                       
 
03-18-09 11:22 AM - Post#80826    


    In response to bouche

personally I wouldn;t use

" echo $_SERVER['PHP_SELF']; "

in the body

I would use <!--PHP_SELF-->

and in the code section I would use

$PHP_SELF = $_SERVER['PHP_SELF'];
The artist formerly known as scroungr
Couch-Tomatoe


 
Stephen
Mostly Harmless
Total Posts: 2514
*
Birthday: 11-26 
Location: San Deigo
Average Post Ranks%:                       
 
03-18-09 02:06 PM - Post#80827    


    In response to Couchtomatoe

did you add fields in your tables for the user to store their twitter credentials?
Stephen Dolenski
FileMaker 7 Certified Developer
FileMaker 8 Certified Developer
FM Forums.com Administrator



 
bouche
FusionBB Addict
Total Posts: 789
*
Location: Gatineau, QC
Average Post Ranks%:                       
03-18-09 04:55 PM - Post#80831    


    In response to Stephen

couch: thanks, I'll modify and see how the code works then.

stephen: not yet. I'm going to get this working first and go from there. I may not need to do that.

Jambands.ca
Come waste your time with us.
Follow me on Twitter!


 
Couchtomatoe
Code Monkey
Total Posts: 3049
*
Birthday: 02-03 
Location: Richmond, Virginia
Average Post Ranks%:                       
 
03-18-09 05:00 PM - Post#80832    


    In response to bouche

Basically put only HTML in the body section and all code in the code section.. use the same method you would use in FusionBB..
The artist formerly known as scroungr
Couch-Tomatoe


 
bouche
FusionBB Addict
Total Posts: 789
*
Location: Gatineau, QC
Average Post Ranks%:                       
03-18-09 05:18 PM - Post#80833    


    In response to bouche

I got it working. THanks for the help. I need to restrict posting to a specific class of users. admin for now.
Jambands.ca
Come waste your time with us.
Follow me on Twitter!


 
Icon Legend Permissions & Sharing Options Topic Options
Print Topic


689 Views
Calendar
SMTWTFS
 1
2345678
9101112131415
16171819202122
23242526272829
30 
Current Quote
"I am liking what I see very much. Things are easy to use and figure out."
~ MissDaisy
FusionBB™ Version 3.2 | ©2003-2013 InteractivePHP, Inc.
Execution time: 0.082 seconds.   Total Queries: 151   Zlib Compression is on.
All times are (GMT-4). Current time is 03:21 PM
Top