Login  |  Register
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome, Guest. Please login or register.
Did you miss your activation email?

August 09, 2022, 05:29:41 AM

Login with username, password and session length
Members
  • Total Members: 3842
  • Latest: Kokoro
Stats
  • Total Posts: 193479
  • Total Topics: 21088
  • Online today: 57
  • Online ever: 1035
  • (November 26, 2020, 04:45:12 AM)
Users Online
Users: 0
Guests: 44
Total: 44

Author Topic: Implement jQuery plugin via php block  (Read 3515 times)

0 Members and 1 Guest are viewing this topic.

Offline agent47

  • Full Member
  • ***
  • Posts: 103
Implement jQuery plugin via php block
« on: January 24, 2011, 04:15:09 AM »
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

Offline IchBin

  • Friends
  • *
  • Posts: 16231
Re: Implement jQuery plugin via php block
« Reply #1 on: January 24, 2011, 09:16:20 AM »
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.

Offline agent47

  • Full Member
  • ***
  • Posts: 103
Re: Implement jQuery plugin via php block
« Reply #2 on: January 24, 2011, 09:48:59 AM »
Followed exactly as stated on the website but I keep getting this error

Code: [Select]
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:
Code: [Select]
<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.

Offline IchBin

  • Friends
  • *
  • Posts: 16231
Re: Implement jQuery plugin via php block
« Reply #3 on: January 24, 2011, 09:59:04 AM »
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 ';