i use joomgallery as media manager because :
- i have a lot of different usersgroups and have created an hidden album for each group where the upload there
- the current media manager from joomla is not friendly
- User will makes a mess (of everything) so it is nice of you still can move stuff without breaking it.
For images within an article this is not a problem but is is for the article intro and full image picture. Users can of course select there image but it will brake when images are archieved(to other category). To fix this i made the SQL script below that replaces the image path to a joomgallery url.
Code
/* Replace ep23j with your own prefix*/
/*replacing article intro image with joomgalley url incase of thumbnail*/
update `joomla`.`ep23j_content`
SET images=replace(images,SUBSTRING_INDEX(SUBSTRING_INDEX(images, '"', 4), '"',-1),
concat('index.php?option=com_joomgallery&view=image&format=raw&id=',(SELECT `id` FROM `joomla`.`ep23j_joomgallery` where
catid= (SUBSTRING_INDEX(SUBSTRING_INDEX(SUBSTRING_INDEX(replace(SUBSTRING_INDEX(SUBSTRING_INDEX(images, '"', 4), '"',-1),"\\",""),'/',-2),'/',1),'_',-1))
AND imgfilename=( SUBSTRING_INDEX(replace(SUBSTRING_INDEX(SUBSTRING_INDEX(images, '"', 4), '"',-1),"\\",""),'/',-1) )
),'&type=thumb') )
where images like '%\\\\/joomgallery\\\\/thumbnails%' /*adjust acording to you own path */
;
/*replacing article intro image with joomgalley url incase of detail*/
update `joomla`.`ep23j_content`
SET images=replace(images,SUBSTRING_INDEX(SUBSTRING_INDEX(images, '"', 4), '"',-1),
concat('index.php?option=com_joomgallery&view=image&format=raw&id=',(SELECT `id` FROM `joomla`.`ep23j_joomgallery` where
catid= (SUBSTRING_INDEX(SUBSTRING_INDEX(SUBSTRING_INDEX(replace(SUBSTRING_INDEX(SUBSTRING_INDEX(images, '"', 4), '"',-1),"\\",""),'/',-2),'/',1),'_',-1))
AND imgfilename=( SUBSTRING_INDEX(replace(SUBSTRING_INDEX(SUBSTRING_INDEX(images, '"', 4), '"',-1),"\\",""),'/',-1) )
),'&type=img') )
where images like '%\\\\/joomgallery\\\\/details%' /*adjust acording to you own path */
;
/*replacing article intro image with joomgalley url incase of original*/
update `joomla`.`ep23j_content`
SET images=replace(images,SUBSTRING_INDEX(SUBSTRING_INDEX(images, '"', 4), '"',-1),
concat('index.php?option=com_joomgallery&view=image&format=raw&id=',(SELECT `id` FROM `joomla`.`ep23j_joomgallery` where
catid= (SUBSTRING_INDEX(SUBSTRING_INDEX(SUBSTRING_INDEX(replace(SUBSTRING_INDEX(SUBSTRING_INDEX(images, '"', 4), '"',-1),"\\",""),'/',-2),'/',1),'_',-1))
AND imgfilename=( SUBSTRING_INDEX(replace(SUBSTRING_INDEX(SUBSTRING_INDEX(images, '"', 4), '"',-1),"\\",""),'/',-1) )
),'&type=orig') )
where images like '%\\\\/joomgallery\\\\/originals%' /*adjust acording to you own path */
;
/*replacing article intro image with joomgalley url incase of detail*/
update `joomla`.`ep23j_content`
SET images=replace(images,SUBSTRING_INDEX(SUBSTRING_INDEX(images, '"', 4), '"',-1),
concat('index.php?option=com_joomgallery&view=image&format=raw&id=',(SELECT `id` FROM `joomla`.`ep23j_joomgallery` where
catid= (SUBSTRING_INDEX(SUBSTRING_INDEX(SUBSTRING_INDEX(replace(SUBSTRING_INDEX(SUBSTRING_INDEX(images, '"', 4), '"',-1),"\\",""),'/',-2),'/',1),'_',-1))
AND imgfilename=( SUBSTRING_INDEX(replace(SUBSTRING_INDEX(SUBSTRING_INDEX(images, '"', 4), '"',-1),"\\",""),'/',-1) )
),'&type=img') )
where images like '%\\\\/joomgallery\\\\/details%' /*adjust acording to you own path */
;
/*replacing article full image with joomgalley url incase of thumbnail*/
update `joomla`.`ep23j_content`
SET images=replace(images,SUBSTRING_INDEX(SUBSTRING_INDEX(images, '"', 4), '"',-1),
concat('index.php?option=com_joomgallery&view=image&format=raw&id=',(SELECT `id` FROM `joomla`.`ep23j_joomgallery` where
catid= (SUBSTRING_INDEX(SUBSTRING_INDEX(SUBSTRING_INDEX(replace(SUBSTRING_INDEX(SUBSTRING_INDEX(images, '"', 4), '"',-1),"\\",""),'/',-2),'/',1),'_',-1))
AND imgfilename=( SUBSTRING_INDEX(replace(SUBSTRING_INDEX(SUBSTRING_INDEX(images, '"', 4), '"',-1),"\\",""),'/',-1) )
),'&type=thumb') )
where images like '%\\\\/joomgallery\\\\/thumbnails%' /*adjust acording to you own path */
;
/*replacing article full image with joomgalley url incase of original*/
update `joomla`.`ep23j_content`
SET images=replace(images,SUBSTRING_INDEX(SUBSTRING_INDEX(images, '"', 4), '"',-1),
concat('index.php?option=com_joomgallery&view=image&format=raw&id=',(SELECT `id` FROM `joomla`.`ep23j_joomgallery` where
catid= (SUBSTRING_INDEX(SUBSTRING_INDEX(SUBSTRING_INDEX(replace(SUBSTRING_INDEX(SUBSTRING_INDEX(images, '"', 4), '"',-1),"\\",""),'/',-2),'/',1),'_',-1))
AND imgfilename=( SUBSTRING_INDEX(replace(SUBSTRING_INDEX(SUBSTRING_INDEX(images, '"', 4), '"',-1),"\\",""),'/',-1) )
),'&type=orig') )
where images like '%\\\\/joomgallery\\\\/originals%' /*adjust acording to you own path */
;
Alles anzeigen
If some one knows how to edit the article edit pages so that the joomgallery plugin shows up instead of the joomla media manager that would be even better but till then this is maybe helpful for others.
Use at own risk, I`m sure there are people you can make a safer script in php as i`m now depend on the number of " in the string.