Coder Social home page Coder Social logo

zp_jqueryui's Introduction

zp_jqueryui

An experimental Zenphoto plugin for jQuery UI

The plugin does two things:

  • Load jQuery on the front end (This does not load the Zenphoto core one but its own newer 1.10.x version!)
  • Experimental: Provides content macros to insert an accordion within the normal description or content fields (planned to be extended to tabs)

Usage

  • Put the file zp_jqueryui.php and the folder of the same name into your /plugins folder
  • Activate the plugin
  • Choose the theme page the scripts should be loaded on
  • Choose the jQuery UI theme to be used
  • Either use the macros below and/or use jquery ui features directly on your theme.

Macros

These are some macros you can enter in all main content text fields.

NOTE: Zenphoto's default editor TinyMCE automatically wraps everything in paragraphs. This results in invalid nested html as the macros are applied after TinyMCE does this. To have these working correctly with valid HTML your server needs to support the PHP Tidy extension.

Because of TinyMCE the macros work best if entered inline and/or via TinyMCE's code view window. Currently you also can only use simple text content (no headlines, no lists etc) within each Accordion element. If you need parapgraphs you mimic them with line breaks.

a) Accordion

Example: http://jqueryui.com/accordion/

[UIACC]
    [UIACC-HL]Headline 1[UIACC-HL-END]
    [UIACC-EL]Some Content 1 [UIACC-EL-END]
    [UIACC-HL]Headline 2[UIACC-HL-END]
    [UIACC-EL]Some Content 2[UIACC-EL-END]
[UIACC-END]

This generats the following HTML:

<div class="ui-accordion">
  <h3>Headline 1</h3>
  <div><!-- content wrapper -->
     Some content
  </div>
  <h3>Headline 2</h3>
  <div><!-- content wrapper -->
    Some content
  </div>
</div>

b) Tabs

Example: http://jqueryui.com/tabs/ The macros to generate those:

[UITABS mytabs a=Tab1 b=Tab2 c=Tag3] // the id of the tabs and then the titles of the tabs. this also sets the number of tabs
  [UITAB 1] // Each tab must get a number and the total number of [UITAB] must match those in the first macro
   Tab content 1
  [UITAB-END]
  [UITAB 2]
   Tab content 2
  [UITAB-END]
  [UITAB 3]
   Tab content 3
  [UITAB-END]
[UITABS-END]

That generates the following HTML:

<div class="ui-tabs" id="mytabs">
  <ul>
   <li><a href="#mytabs-1">Tab1</li>
   <li><a href="#mytabs-2">Tab2</li>
   <li><a href="#mytabs-3">Tab2</li>
  </ul>
  <div id="mytabs-1">
    Tab content 1
  </div>
  <div id="mytabs-2">
   Tab content 3
  </div>
  <div id="mytabs-3">
   Tab content 3
  </div>
/div>

zp_jqueryui's People

Contributors

acrylian avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.