• Content Count

  • Joined

  • Last visited

  • Days Won


davidg last won the day on August 4 2019

davidg had the most liked content!

Community Reputation

1 Neutral

About davidg

  • Rank
  1. Incase someone wants to do this, here is the PHP code you need: // This works by pulling up the content of the first post of the topic you designate by ID number. // To find a topic's ID, look at the topic's URL, it's a five or six digit number // Replace the number below with your topic number $topic_number = "90"; $myvar = ""; // LINKS TO DATABSE $link = new mysqli('DB_ADDRESS', 'DB_USER', 'DB_PASS') or die('Could not connect: ' . $link->error); $link->select_db('DB_NAME') or die('Could not select database'); // PULLS TOPIC TO FIND POST ID $show_results = mysqli_query($link,"SELECT * FROM forums_topics WHERE tid='$topic_number'") or die ("Couldn't find the topic with that number"); while($row = mysqli_fetch_array($show_results)){ $topic_id = $row['topic_firstpost']; $myvar = $topic_id; } // PULLS POST CONTENT FROM POST ID $show_results2 = mysqli_query($link,"SELECT * FROM forums_posts WHERE pid='$topic_id'") or die ("Couldn't find the PID part"); while($row = mysqli_fetch_array($show_results2)){ $myvar = $row['post']; } // REMOVE nbsp TAG AND REPLACES WITH HTML FRIENDLY VERSION // This is required due to a bug with the automation return $output = str_replace("\xA0", "&#160", $myvar); return "$output";
  2. Thanks, would you happen to know what that php code might look like?
  3. I would like to have an automated post made to a topic after pinning it. The content of this new post i'd like to have come from another post (saved in a templates forum) that is editable by members not having access to the ACP. I know its possible, i've seen it done elsewhere using this plugin, but I am not sure how to set it up. Thanks!