Menu Content

Support

> Forums, FAQs & Paid Support
Welcome, Guest
Username Password: Remember me

Problem solved with the plugin JoomDOC editor
(1 viewing) (1) Guest
Support forum for users using free edition of JoomDOC. These forums are mainly for mutual help between users.

NOTE: Due to our capacity limitations, ARTIO does not monitor this forum category regularly. If you want direct support from ARTIO, please start a ticket at Support Dashboard. If you have no support ticket available, you need to purchase it.
  • Page:
  • 1

TOPIC: Problem solved with the plugin JoomDOC editor

Problem solved with the plugin JoomDOC editor 12 years, 1 month ago #30588

Hi everyone,

I start to use JoomDOC, and I try the plugin of JoomDOC (Editors-xtd - JoomDOC) to add JoomDOC link into my articles.

I had an error "Fatal error: Call to undefined method JoomDOCFile::getPaths()".
I had this error because I was on this page : localhost/joomla/administrator/index.php...;path=FOLDERfile.pdf
This is in the backend part, and the application have to work on the frontend part. This is the first bug.
I make some to modifications to the component to solve this first bug.
I go to the file administrator/components/com_joomdoc/views/documents/tmpl/modal.php.
I modify the around the line 80 :
 
if (JString::strpos($url, $prefix) === 0) {
$url = JString::substr($url, $prefixLength);
}

by this (I just had an else condition)
if (JString::strpos($url, $prefix) === 0) { // Si la position du préfixe dans l'url est = à 0
$url = JString::substr($url, $prefixLength); // alors on enlève le préfixe
} else {
$url = substr_replace($url, "/", JString::strpos($url, $prefix), $prefixLength);
}


But there was an other error, the URL was not good. She should be like that : localhost/joomla/administrator/index.php...=documents&path=FOLDER\file.pdf et she was like that localhost/joomla/administrator/index.php...;path=FOLDERfile.pdf
So I modifiate the line :
echo '<a href="javascript:window.parent.jSelectJoomdocDocument(\'' . $id . '\', \'' . $title . '\', \'' . $url . '\')" class="hasTip addDocument" title="' . $this->getTooltip('JOOMDOC_SET_DOCUMENT') . '"></a>';

by
echo '<a href="javascript:window.parent.jSelectJoomdocDocument(\'' . $id . '\', \'' . addslashes($title) . '\', \'' . addslashes($url) . '\')" class="hasTip addDocument" title="' . $this->getTooltip('JOOMDOC_SET_DOCUMENT') . '"></a>';


I hope it can help someone ...

Note : I'm a french guy, sorry for the mistakes english
  • Page:
  • 1
User Login Empty