| @@ -142,10 +142,9 @@ | ||
| 142 | 142 | } |
| 143 | 143 | $template->setData($this->inputs['item']['template']) |
| 144 | 144 | ->setQueueName(); |
| 145 | 145 | $templateDirName = $template->get('queueName'); |
| 146 | - $contentDir = end( explode( DIRECTORY_SEPARATOR, dirname( dirname( plugin_dir_path( CJTOOLBOX_PLUGIN_FILE ) ) ) ) ); | |
| 147 | - $templateDir = "$contentDir/{$fSConfig->contentDir}/{$fSConfig->templatesDir}/{$templateDirName}"; | |
| 146 | + $templateDir = content_url( "{$fSConfig->contentDir}/{$fSConfig->templatesDir}/{$templateDirName}" ); | |
| 148 | 147 | if (!$template->get('id')) { // Add new Template |
| 149 | 148 | // Search for author for the current local Wordpress user. |
| 150 | 149 | // If not created in the Authors table create one! If created get the ID! |
| 151 | 150 | $author = CJTxTable::getInstance('author', null, "SELECT * FROM #__cjtoolbox_authors |