TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

May 15, 2024, 06:38:47 AM

Login with username, password and session length
Members
  • Total Members: 3,886
  • Latest: Grendor
Stats
  • Total Posts: 195,188
  • Total Topics: 21,220
  • Online today: 149
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 120
  • Total: 120

Implement jQuery plugin via php block

Started by agent47, January 24, 2011, 11:15:09 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

agent47

First of all I would like to say, I know you guys are busy so if I don't get a response I'll totally understand.

I basically need to know how does one implement a simple plugin such as this one with the use of a php block. I know this is possible. Once I implement this plugin I wish to add the recent topics code which I grabbed from this site. Each tab will consist of recent posts from particular boards.

Mainly, I just like to know how to implement the plugin.

Yours sincerely

IchBin

You do exactly what they instruct on the site. The only difference is you don't put anything in the head. You just put all the code in the block.

agent47

Followed exactly as stated on the website but I keep getting this error

Parse error: syntax error, unexpected '<' in /home/super849/public_html/Sources/Load.php(2390) : eval()'d code(48) : eval()'d code on line 1

I basically pasted the .js file in themes/default/scripts folder and pasted this bit:
<ul class="idTabs">
  <li><a href="#jquery">jQuery</a></li>
  <li><a href="#official">Tabs 3</a></li>
</ul>
<div id="jquery">If you haven't checked out ...</div>
<div id="official">idTabs is only a simple ...</div>
on a PHP block.

IchBin

Anytime you put HTML into PHP it has to be in an echo statement.

echo ' all your html goes in between the single quotes and ends with a semi-colon ';