Home
Contact Us
News
Links
Site Map
Recent Forum Topics
Bibtex in Joomla 1.5 with legacy mode
(0)
Is com_jombib compatible with Joomla 1.5.rc3?
(9)
When relese joomla 1.5 compatibile ?
(1)
URGENT - Phishing hacked into Bibtex
(8)
Unable to download BibTex
(3)
FireBoard
(2)
Page navigation / users problem
(1)
Serious problem - paging
(6)
Order by first author last name
(0)
ability to link to certain authors
(3)
...
Home
News
Joomla Extensions
Research
Downloads
Programming
Graphic Design
Me
Forum
Gallery
What I Don't Know Wiki
Search
Links
Contact Me
Bibliography
Administrator
Login
Username
Password
Remember me
Lost Password?
No account yet?
Register
Who's Online
We have 2 guests online
Google
Home
Programming
Joomla Extensions
Author: Last name displayed first
Enter your search terms
Submit search form
Discussion Forum
January 09, 2009, 12:58:40 AM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
: SMF - Just Installed!
Home
Help
Search
Login
Register
Discussion Forum
>
Programming
>
Joomla Extensions
>
Author: Last name displayed first
Pages: [
1
]
« previous
next »
Print
Author
Topic: Author: Last name displayed first (Read 758 times)
Peter Cutter
Newbie
Posts: 2
Author: Last name displayed first
«
on:
October 18, 2007, 01:47:10 PM »
Hi Mark,
Amazingly useful component--thanks!
I'm currently having a bit of trouble getting the last name of the author to display first in the display table (single line truncated display option). We need to have the last name display first or else it is not visible in this, our prefered display format.
Any ideas?
Thanks,
Pete
Logged
Mark Austin
Administrator
Full Member
Posts: 101
Re: Author: Last name displayed first
«
Reply #1 on:
October 29, 2007, 08:56:51 AM »
That should be possible by tweaking the code a bit. In jombib.php lines 750 to 760 generate the authors name that is stored in the database. If you change the order of this bit of code, you will get what you want. However this change will only work if you re-add or edit your references.
if($sets['fullnames']=="on"){
$authnames =$authnames.$author['first']." ";
if($authorcount==1){
$shortauthnames =$shortauthnames.$author['first']." ";
}
}
$authnames =$authnames.$author['last'];
if($authorcount==1){
$shortauthnames =$shortauthnames.$author['last'];
}
change to
$authnames =$authnames.$author['last'];
if($authorcount==1){
$shortauthnames =$shortauthnames.$author['last'];
}
if($sets['fullnames']=="on"){
$authnames =$authnames.$author['first']." ";
if($authorcount==1){
$shortauthnames =$shortauthnames.$author['first']." ";
}
}
Logged
Peter Cutter
Newbie
Posts: 2
Re: Author: Last name displayed first
«
Reply #2 on:
November 18, 2007, 12:04:04 AM »
Hi Mark,
That worked like a charm (although I also added a comma and space after the last names...).--Thanks much!!!
I am probably pushing my luck but was wondering if you could help me accomplish 2 more formatting things:
1) I need the author part of th list view to be a little wider; and
2) I need to replicate another journal style that looks like this:
Rahman, M. M. 1982. A study of tiger population of Nilkamal Sanctuary in the Sundarbans. Bano biggyan patrik 11:36-40.
e.g. no parentheses on the year and no " on the title.
I would be happy to pay you (donation I guess) for helping with these modifications.
Many thanks in advance,
Pete
Logged
joomla-freak
Newbie
Posts: 4
Re: Author: Last name displayed first
«
Reply #3 on:
November 19, 2007, 12:23:25 PM »
Dear Pete,
I am not Mark, but I can give an answer to your secondo question:
In the file jombib.html.php
you can change the format how you like to print the title:
title without ":
if (HTML_jombib::keyExistsOrIsNotEmpty('title',$row)){
if($link=="none"){
echo ", ".$row['title']."";
}else{
echo ", <a href='$link' title='View Reference Details'>".$row['title']."</a>";
}
}
May be you can write the title also in italic:
if (HTML_jombib::keyExistsOrIsNotEmpty('title',$row)){
if($link=="none"){
echo ", <i>".$row['title']."</i>";
}else{
echo ", <a href='$link' title='View Reference Details'><i>".$row['title']."</i></a>";
}
}
The year with out ( ):
if (HTML_jombib::keyExistsOrIsNotEmpty('year',$row)){
echo " ".$row['year']."";
}
I did a copy from my site and I hope it works also on your site.
greetings
annette
Logged
Ranja
Newbie
Posts: 7
Re: Author: Last name displayed first
«
Reply #4 on:
November 22, 2007, 09:05:22 PM »
Quote from: Mark Austin on October 29, 2007, 08:56:51 AM
That should be possible by tweaking the code a bit. In jombib.php lines 750 to 760 generate the authors name that is stored in the database. If you change the order of this bit of code, you will get what you want. However this change will only work if you re-add or edit your references.
if($sets['fullnames']=="on"){
$authnames =$authnames.$author['first']." ";
if($authorcount==1){
$shortauthnames =$shortauthnames.$author['first']." ";
}
}
$authnames =$authnames.$author['last'];
if($authorcount==1){
$shortauthnames =$shortauthnames.$author['last'];
}
change to
$authnames =$authnames.$author['last'];
if($authorcount==1){
$shortauthnames =$shortauthnames.$author['last'];
}
if($sets['fullnames']=="on"){
$authnames =$authnames.$author['first']." ";
if($authorcount==1){
$shortauthnames =$shortauthnames.$author['first']." ";
}
}
I did this (in jombib.php), and I deleted all my references and re-entered them. And NO change at all. I don't understand why. Do you?
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> General Discussion
-----------------------------
Programming
-----------------------------
=> Joomla Extensions
=> Help with downloaded scripts
Loading...
© 2009 Everything That I Know About