►
From YouTube: TTEOT Training Video - S1E15 - jQuery & CSS: Placards
Description
It's time to boldly go where no man has gone before - or at least no Koha OPAC has gone before. Join us this week as we explore strange, new worlds with our hosts while they show you how to add placards (information panels) to OPAC search results for items outside of your normal collection. This is an episode that even Jean Luc Picard would be proud of. (Or is that Jean Luc Placard?)
Referenced code: https://wiki.koha-community.org/wiki/JQuery_Library#Add_database_placards_in_search_results_based_on_keywords_.28v20.x.29
Music: https://www.bensound.com
A
A
So
hello,
everybody,
this
is
captain
george
williams
and
since
we're
beginning
the
month
of
april,
we've
chosen
star
trek
the
final
frontier
by
diane
carey
to
be
this
month's
star
trek
discussion
book,
and
we
have
of
course
chosen
this
book
for
april
because
it
features
captain
robert
april,
who
was
the
captain,
the
enterprise
before
captain
pike
and,
of
course
his
first
officer
was
george
kirk,
captain
kirk's
father.
A
So
if
you've
never
listened
to
one
of
our
podcasts
in
the
in
the
past,
the
way
that
this
works
is
in
each
episode,
we'll
do
a
close
reading
of
one
chapter
every
day
for
the
entire
month
and
we'll
include
separate,
shows,
of
course,
for
the
prologue
and
the
epilogues.
This
book
will
take
28
episodes
to
discuss
each
episode's
about
you
know
60
to
90
minutes
so
be
prepared.
A
I
know
that
we
don't
always
like
to
cover
things
that
slowly,
but
you
know
we've
only
got
a
month
to
do
this,
so
I,
of
course,
will
talk
about
the
social
and
historical
time
period
in
which
the
book
was
written,
which
is
1988.
So
this
is
right
at
the
beginning
of
star
trek,
the
next
generation
and
how
that
affects
the
content
of
the
book
and
with
me,
as
always,
is
patrick.
Who
was
going
to
be
talking
about
wait.
A
minute.
A
A
B
I'm
christopher
brandon,
with
the
cooperative
information
network
and
the
coeur
d'alene
public
library
today
we're
going
to
be
talking
about
panels
search
panels.
B
This
is
something
that
was
that
I
dreamed
up
back
a
couple
years
ago
at
an
actual
koha
us
conference
on
my
off
time,
and
so
we're
gonna
be
going
through
that
today,
but
first
as.
A
B
B
Did
a
brief,
I
did
a
brief
show
off
on
it.
Yes
yeah
after
I
had
come
up
with
it,
but
but
first,
let's
talk
about
kaha
us
koha.
Us
is
a
great
website
for
our
affiliates
in
the
us,
or
even
those
that
are
not
that
are
curious
about
what
we
are
doing.
Kohai
us.org
is
the
website
and
you
will
find
all
of
our
videos
on
the
learn
from
koha
us
page.
B
Click
on
the
koha
us
videos,
it'll.
Take
you
right
there
with
all
the
great
training
videos
that
we've
done
so
far.
Although
there's
a
typo
in
there,
I
have
two
episode
13s.
I
I
need
to
fix
that
it
should
say
14.
we're
up
to
14.
Now
this
one
will
be
very
unlucky
now
yep,
yep
anyways,
so
all
of
our
great
videos
are
on
this
page
and
today,
as
I
said,
we
are
going
to
be
talking
about
panels.
What
are
panels
you
may
ask.
B
B
So
panels
placards
whatever
you
prefer
to
call
them,
maybe
just
call
them
nuisances.
I
don't
know
what
are
placards
okay.
Let
me
give
you
a
brief
demonstration
of
this.
I
actually
had
it
up
here
when
you,
when
you
do
a
search
in
the
cohab
catalog,
and
this
is
only
I've
only
designed
this
for
the
patron
side.
B
I
I
don't
annoy
staff
with
this
this
sort
of
thing,
but
when
you
do
a
search
in
the
catalog,
you
get
some
great
results,
but
we
had
some
resources
that
weren't
showing
up,
because
we
don't
catalog
them
like
some
of
our
databases.
B
So,
for
example,
we
have
a
news
archive
where
we
actually
have
local
archives
of
old
newspapers,
and
that
does
not
come
up.
But
if
you
search
for.
B
Newspaper
you'll
get
your
regular
results,
but
one
of
the
results
is
going
to
be
what
we
call
the
placard,
and
this
is
plugging
our
our
archives.
It
has
more
than
newspapers,
but
one
of
the
key
words
that
it
comes
up
with
is
a
newspaper.
B
I
could
do
the
singular
or
plural
version
of
the
word
uppercase
or
lowercase
I
can
do.
I
can.
I
have
not
only
news
in
there
but
our
newspaper,
but
I
have
news.
I
have
quarterly
press
which
is
one
of
our
papers.
That's
in
there
so.
B
You
can
define
the
keywords,
and
so
this
is
what
we're
going
to
be
showing
off
today.
It's
still
a
work
in
progress,
there's
still
some
things
I
have
to
to
tweak
out
it
in
it,
and
you
know
once
we
get
the
the
code
on
the
the
library
by
the
time,
this
video
posts,
hopefully
I'll,
have
some
of
that
cleaned
up
a
little
bit
more.
B
B
Originally,
it
was
just
thrown
together
and
I
knew
how
to
put
things
in
there,
but
I
wanted
to
make
it
a
little
bit
more
user-friendly
for
everybody.
So
I've
been
tweaking
the
code
a
little
bit
and
I'm
still,
you
know
finessing
that
just
a
little
bit,
but
it
it'll
be
there
by
the
time
that
this
video
is
posted
and
I'll
have
links
to
it.
In
the
the
learn
page.
A
B
Yeah
so.
A
But
I
like
this,
I
like
the
logo.
I
like
the
the
way
that
it
stands
out.
It's
got
the
same
background
that
you've
got
for
your
overdrive.
Built-In
overdrive,
plug-in
background,
so.
B
Yeah
and
that
that's
a
little
bit
more,
that's
another
modification,
it's
not
covered
today,
but
yeah
that
you
know
I
I
have
modifications
up
there
for
for
that,
so
that
that
link
stood
out
a
little
bit
more.
But
I
want
to
also
go
into.
Let
me
do
another
search
here,
and
that
was
we
have
a
service
called
mango
languages,
mango
languages,
and
I
have
keywords
for
like
you
know.
B
If
you
search
for
french
or
spanish
or
chinese,
I
I
didn't
put
in
every
language
in
there,
but
if
you
search
for
those
languages,
it'll
also
come
up
on
the
results,
this
one's
a
little
bit
different
because
the
content
includes
you
know
specifics
for
specific
libraries
in
our
group
because
they
have
their
own
sign-in
panel
right.
B
A
B
B
So
let's
we're
going
to
play
with
this
in
the
the
koha
us
demo,
okay
website.
B
And
there
are,
there
are
a
couple
sections
for
this.
First
we're
going
to
start
off
with
some
css.
I
have
some
css
I'm
going
to
plug
in
here.
First,
this
just
defines
some
layout
this.
This
will
show
the
the
light
yellow
background
in
my
example
in
the
border
and
give
it
a
little
bit
of
a
radius
and
a
minimum
height
and
lay
it
out
so
that
the
the
it's
it's
in
two
sections.
It's
got
a
left
section
in
the
right
section.
B
The
left
section
will
be
floating
to
the
left
and
the
right
section
will
be
next
to
it.
So
it'll
lay
it
out
nicely.
A
B
I
also
I
have
I
defined
a
a
class
for
the
cell
that
it's
in
because
I
don't
know
if
you
noticed.
I
took
that
that
cell
out,
depending
on
where
you
you
place
it,
it
might
land.
You
know
if
you
decide.
B
Oh,
it's
it's
going
to
be
on
the
third
result:
it's
not
going
to
be
a
second
result
or
it
might
be
the
first
result
wherever
you
place
it,
if
it
has
that
if
it
lands
on
a
cell
that
has
the
the
gray
background
that
would
show
behind
it,
and
so
I
just
said
I
I
don't
want
anything
to
show
behind
it.
B
So
that's
pretty
much
all
there
is
to
the
css
I'm
going
to
be
tweaking
this
a
little
bit
because
well
I'll
go
ahead
and
show
it.
I
have
another
service
on
here
and
I
have
to
to
tweak
this.
So
I.
B
Yeah,
so
you
know
I
I
need
to
tweak
it
so
that
it
will
properly
size
the
the
image
to
fit
in
there.
So
I'm
still
getting
some
of
the
the
image
settings
down
on
this
and
by
the
time
that
this
video
video
posts,
hopefully
I'll,
have
that
that
portion
fixed
in
there.
So
the
css
will
be
slightly
different,
but
it
gives
you
the
gist
of
of
what
we're
doing
with
that
css.
B
B
Yet
so
I've
got
the
css
in
place
now,
I'm
going
to
place
the
jquery
and
all
of
this
by
the
way
is
going
in
the
opac
side.
So
this
is
the
opec
css,
that's
in
there
and
the
opac
user
js,
and
here
is
the
js
for
this
okay.
So
there's
a
bit
quite
a
bit
here,
but
I'm
going
to
to
break
this
down
a
little
bit
and,
first
of
all,
let
me
clear
out:
well
I'll
leave
it
in
there.
B
The
first
thing,
that's
in
this
js
that
that
I
want
to
point
out-
is
I
have
a
section
here
that
that
creates
a
new
expression
called
I
contains.
This
will
allow
you
to
do
a
search
that
is
case
insensitive
because
we
use
we
use
a.
If
I
use
contains
it's
going
to
be
case,
sensitive
and.
B
Yes,
and
you
won't
have
you
won't
always
get
the
the
results
that
you
want,
so
this
makes
it
case
insensitive.
This
was
something
that
I
found
that
that
really
made
this
work
a
lot
better.
B
Something
new
here
that
you
may
not
have
seen.
George
is
I've
added
some
variables
or
a
new
variable
called
placard
row.
B
This
defines
where
you
want
that
result
to
show
up
okay
before
it
was
just
you
know,
hard-coded
in
in
the
code,
and
you
had
to
go,
and
you
had
to
know
where
to
find
that
in
order
to
put
it
in
its
place,
I
also
changed
it
where
it's
using
that
placard
row
we're
using
a
before,
whereas
before
I
was
using
and
after
or
yeah,
I
was
using
an
after
and.
B
A
B
Exactly-
and
you
know
it's
not
likely,
somebody's
going
to
you
know
be
way
down
in
the
list
in
the
results
for
that
that
placard,
so
this
was
a
safer
path
to
go.
So
I
added
that-
and
I
made
it
so
that
you
can.
You
can
stick
in
the
exact
number
that
you
wanted
and
it'll
calculate
correctly.
What
where
that
placement
is.
A
B
B
So
it's
searching
through
this
array
and
you
have
a
basic,
basically
a
small.
It
starts
off
the
the
array
with
a
mini
array
within
it,
so
inside
its
own
set
of
brackets.
Here
are
the
keywords
that
it's
looking
for,
that
it
will,
if
you
type
in
this
this
keyword,
this
result
will
come
up
okay.
So
if
you,
for
example,
this
is
our
mango
example.
If
you
put
in
the
word
language,
french,
spanish
chinese
mango,
it
will
pop
up
this
result.
B
B
B
A
B
And
you
know
I
put
in
a
heading:
it
creates
that
heading
in
that
drop
down
menu.
The
text
and
you
know
the
link-
and
in
this
case
it
has
the
drop
down
menu.
So
there's
quite
a
bit
to
this
particular
one
for
the
news
section:
here's
our
our
keywords
for
the
news
and
then
we
have
our
image
for
the
archive
and
then
our
linked
text.
That
goes
in
that
on
the
right
side,
then
I
had
another
one
for
freegle.
A
B
A
B
After
that,
after
you've
defined
those,
you
have
your
placard
logic
and
placement.
So
it's
going
through
a
loop,
it's
it's
checking
it's
looking
for.
Basically,
it
is
looking
for
the
bread
crumbs
it's
using
the
breadcrumbs
and
checking
to
see
if
one
of
your
keywords
exists.
In
section
it
says
you
searched.
A
To
you,
but
somebody,
that's
watching
that's
new
to
quahog
might
not
know
this.
What
are
the
breadcrumbs.
A
A
B
So
anytime,
that
you
visit
a
page,
the
breadcrumbs
change
breadcrumbs
is
basically
a
trail
back
to
how
you
got
there.
Basically.
B
A
I've
never
really
thought
about
it
before,
but
if
you
used
a
keyword
like
results
or
home
that
would
those
would
probably
be
bad
keywords
to
put
in
the
placard
search
because
they're
going
to
be
a
lot
of
breadcrumbs.
B
Yes,
probably
you
know,
and
you
know
it
could
mean
that
we
need
to
refine
the
the
way
it's
searching
the
breadcrumbs
as
well.
You
know
it's,
it's
been
a
while
it's
been
a
couple
of
years
since
I
I
created
this,
you
know
programmers
are
adding
ids
all
the
time
and
they
may
have
made
it
a
little
simpler
for
us
to
id
those
breadcrumbs
so.
B
So
that's
the
loop.
It's
keeping
track
of
the
placard
count,
so
you
know
it.
It
knows
how
many
times
to
go
through
the
the
variable
and
the
array
searching
for
those
terms.
B
And
go
back
over
to
here
now
before
when
I
searched
search
for
news,
I
didn't
get
any
results,
I'll
search
for
it
again
and
now
I
have
there,
you
go
a
result
and
that
placard
comes
up
and
it
comes
up
in
the
second
place
where
we
have
defined
it
in
our
code.
If
I
go
up
here-
and
I
say
I
want
it
in
row-
3-
I
can
save
that
and
search
for
that
term.
Again,
if
it's
an
nr3
puts
in
a
row,
three.
A
A
So
I'm
using
your
older
version
of
this
code
and
if
you
let
me
share
my
screen,
I
can
show
you
where
I'm
using
enter
go
for
it.
Let's
see,
share
screen
one.
A
Of
it,
so
I
don't
have
the
variable,
I
do
have
the
placard
count
and
I'm
using
it
for
our.
We,
we
subscribed
to
flipster
for
magazines.
So
if
I
do
a
search
and
I've
got
a
ton
of
keywords
in
here,
because
essentially
I
use
the
title
of
every
magazine
we
subscribe
to
with
flipster
yeah
is
in
there.
So
if
we
do
a
search
for
for
flipster,
we'll
get
her
we'll
get
the
placard
we'll
show
up.
A
I
didn't
have
the
variable
that
you
have
so
I've
got
it
set
to
come
up
in
the
third
position
and
then
I've
got
it
to
come
up
again
in
the
ninth
position,
but
I
wanted
people
blew
over
it.
I
wanted
him
to.
I
wanted
it
to
pop
up
again,
but
it
will
do
a
if
you
do
flipster
or
if
you
know
the
atlantic
monthly.
A
And
so
if
we
do
a
search
for
any
any
individual
title,
it
pops
up
as
a
placard
too
and
and
then.
A
Recently,
the
hoopla
app
we
now
have
hoopla
integration
in
our
system,
but
we
haven't
always
had
it,
but
if
we
do
a
search
for
hoopla,
that's
the
other
placard
that
I've
got.
A
A
You
know
we
have
a
ton
of
libraries
with
a
ton
of
magazines,
and
so,
if
you
do
a
search
for
something
like
for
something
like
real
simple,
you
might
get
a
lot
of
results,
because
a
lot
of
libraries
are
cataloging
your
magazines
differently
and
they're
generally
cataloging
them
on
separate
records.
So
the
real,
simple
link
for
flipster,
for
I
do
have
a
record
in
there.
That's
just
a
link
out
to
the
flipster
real
simple
that
we
own,
but
it
might
be
the
fourth
or
fifth
one
down.
A
A
You
know
every
other.
One
would
be
too
much,
but
you
know
having
it
a
couple
of
times
or
you
know
having
it
be
like
you
know,
you
get
one
result
and
then
you
get
19
placards
and
then
you
gotta
go
to
the
next
big
that
you
know.
There's
there's
a
bunch
of
different
ways.
You
can
do
it,
but
I
didn't
want
it
to
be
overwhelming,
but
I
wanted
it
to
show
up
more
than
once
so
well.
B
B
This
will
go
online
april
1st
april
fool's
day.
That's
crazy.