The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
#1
|
|||
|
|||
Connecting to mysql when you click
Hi,
I try to add "broken link" function into one of plugins. In postbit plugin when you click the text, it add your ip and titleid into mysql. But i don't know what should i write for a href. In the thread if i click the link, it doesnt work but writing the link to the web browser address bar and clicking ENTER. It Works... like this: https://vborg.vbsupport.ru/showthrea...=67731?do=link Code:
<plugin active="1" executionorder="5"> <title>Broken Link</title> <hookname>postbit_display_start</hookname> <phpcode><![CDATA[ $linkler = $this->registry->db->query_read("SELECT * FROM broken_link where url LIKE '$post[threadid]'"); $sonuc=mysql_num_rows($linkler); if ($_REQUEST['do'] == 'link' && $sonuc < 1) { $broken_gonder = $this->registry->db->query_read("INSERT INTO broken_link (ip, url) VALUES ('".$_SERVER["REMOTE_ADDR"]."', '".$post[threadid]."')"); } ]]></phpcode> </plugin> Code:
<template name="showthread_extra_fields" templatetype="template" date="1140414721" username="uname" version="1"><![CDATA[] <if condition="$sonuc == 0"> <a href="/showthread.php?t=$post[threadid]?do=link" onClick="alert('It's OK')">Report Broken Link</a> </if> ]></template> |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|