Home arrow Forum

Remository Forum

 


bestbossi

Karma: 0  
Edit in the frontend - 2008/11/20 13:31 I have installed Glossary 2504J on Joomla 1.5.7. Can I only add new entries in the frontend. Is'nt it possible to delete or edit the entries? Thx for answering
  | | Sorry, you do not currently have permission to write here.
admin

Karma: 98  
Re:Edit in the frontend - 2008/11/25 11:24 Not from the user side, at present. Martin Brampton aka Counterpoint
http://aliro.org
http://black-sheep-research.com
  | | Sorry, you do not currently have permission to write here.
siliconfarm

Karma: 0  
Re:Edit in the frontend - 2010/02/27 22:50 hi, I really wanted this function as well. After playing around I found an pretty straight forward way...it makes me wonder who really wrote this code ??


if you open:
components > com_glossary > v-classes > glossaryEditHTML.php

You see that there's already an option to load the page with existing information to edit.

And if you open glossaryUserHTML.php
you'll see that even the "add an entry" button of the frontend uses a link that refers to the "edit" task:
$addlink = $interface->sefRelToAbs("index.php?option=com_glossary&task=edit&id=0&glossid=".$glossary->id);

It's only missing the id of the entry to edit !
So basically, all you need in glossaryListHTML.php is to use:

$editlink = $interface->sefRelToAbs("index.php?option=com_glossary&task=edit&id=".$entry->id."&glossid=" .$glossary->id);


The only thing missing was to give acces to allowed users only...which is if ($allowentry) {} in glossaryUserHTML.php but it does not work in glossaryListHTML.php

so you have to edit:
components > com_glossary > c-classes > glossary_list_Controller.php

move:
$allowentry = ($this->gconfig->anonentry OR ($this->gconfig->allowentry AND $my->id));

above the if statement:
if ($total) {

that includes:
require_once ($interface->getCfg('absolute_path').'/components/com_glossary/v-classes/glossaryListHTML.php');

and add $allowentry to the variablesto sent to glossaryListHTML.php :

$listhtml = $listing->view($entries, $letter, $grandtotal, $allowentry);

and finally add the variable to the function on glossaryListHTML.php:

function view ($entries, $letter, $total, $allowentry) {

now you can add the editing button next to the word on glossaryListHTML.php :

{$this->showHTML($entry->tterm)}
LIST_ENTRY;
if ($allowentry) {
$editlink = $interface->sefRelToAbs("index.php?option=com_glossary&task=edit&id=".$entry->id."&glossid=" .$glossary->id);
$listhtml .= <<
LIST_ENTRY;
}
$listhtml .= <<

that's it, it works !!! most of it was already there...it only needed to be enabled !!

Not Possible is never an answer...

I hope it helps someone !

Post edited by: siliconfarm, at: 2010/02/27 22:55
  | | Sorry, you do not currently have permission to write here.
hanna

Karma: 0  
Re:Edit in the frontend - 2010/02/28 09:24 Hi Siliconfarm,

seems you are knowing joomla very well.
Maybe you could help me too.
I could manage to format the code in the glossary with "markdown", but i could not format the term itself.
How can i add a space between the title term in the popup?
And there is another thing. I would like to edit the look of the popup, but i could not find any css to edit. How can i add a border to the popup and edit the popup itself?

josi121978 ( a t ) gmx.de

kind regards
Josi

Post edited by: hanna, at: 2010/02/28 09:28
  | | Sorry, you do not currently have permission to write here.

Login

Subscribe to Premium Support

Get priority support for Remository and Glossary, sign up now for a Premium Support monthly subscription:

Your Remository user name

Or purchase a year's support:

Your Remository user name

Recommended SEF

SEF Advance

Who is Online

Remository welcomes guests and visitors

We have 12 guest online