Sorry to keep bugging you. I really do appreciate your help. The str_replace is working for just plain text, but when it's inside a {} it kind of works, but not really. I'm trying to call a module YOOgallery and have it show the images for whoever is currently logged in (located in a folder with the same name as the user's username). Here is the code:
{yoogallery src=[clients/--user--/proofs]}
where --user-- gets swapped for the username, but it gives me this error message:
Unable to find the source directory (/home/avidcrea/public_html/newavid/clients/toi/proofs/), please check if your source directory exists.
It looks like the str_replace worked because it shows the toi instead of --user-- in the path, but why does it add all that source path in the front? It does that even if I use the full URL:
http://www.avidcreative.com/newavid/clients/--user--/proofs
If I type in the code myself instead of letting the str_replace do it, it works fine.
{yoogallery src=[clients/toi/proofs]}
Do you have any idea why it would be adding that source path at the front of it and if there is a way to avoid that? Again, thank you very much for your help!
Also, is there a way to get it to work on a module? For example, I have a module that will list all the files in a certain folder. In the Module Parameters, it asks for a Directory Path and I'd like to be able to use the --username-- str_replace to point the module to the folder of the user who is currently logged in. Is there a way to do that?