When using the embed tag to include a forum or gallery in a page there seems to be no way to link to a sub page within those applications. If I have a forum included with embed tag in a page in cmsms the tag looks something like this
{embed url=”cmsms/forum/”}
If I for instance would like to link to a forum post from my news section the url would be something like
cmsms/forum/viewtopic.php?id=2
Obviously this would take me to the forum outside of the cmsms page where I have the iframe. I’m wondering if the “viewtopic.php?id=2” instead could be sent as an argument to the page where the embed tag is and then make the embed tag accept this argument in its url path. I know nothing about php so forgive me if this is a stupid thought. I was thinking if something like this would be possible. On the cmsms page where I put the forum I use an embed like this
{embed url=”cmsms/forum/}
the link to this page would then be something like
http//cmsms/index.php?page=forum&argument=’viewtopic.php?id=2’
Off course what I have written above will not work, but hopefully it explains approximately what I would like to have. Could something like this technically be achieved? If so could the embed tag easily be modified to do something like that?
David
Linking to topic in embedded forum?
-
jelle
Re: Linking to topic in embedded forum?
Sure, why not?
The thing you might want to watch out for is the = sign in your argument, it might behave funny, a though I am not sure about that. Your argument can be found in $_GET['argument'] in php. I don't know enough about smarty how you can use smarty(user defined)tags inside other tags, so I'll leave that lesson to you.
The thing you might want to watch out for is the = sign in your argument, it might behave funny, a though I am not sure about that. Your argument can be found in $_GET['argument'] in php. I don't know enough about smarty how you can use smarty(user defined)tags inside other tags, so I'll leave that lesson to you.
-
davidL
Re: Linking to topic in embedded forum?
Ok. This is interesting. Could someone please give me more detailed thoughts on how this could be achieved? At first I was mostly curious if it could be done but now I would really like to implement it in order to link to specific images in my embedded image gallery.
In my explanation in previous post I put php code in the smarty tag. Since this doesn’t work I am wondering how I could read the argument sent to the page (using $_GET[]) and then send this with the url called in the smarty. Can I maybe make a user defined tag that reads the argument and then somehow call the embed with the proper url? I’m grateful for any thought or ideas on this.
...and please keep the level of explanations simple as I’m totally novice on php
/David
In my explanation in previous post I put php code in the smarty tag. Since this doesn’t work I am wondering how I could read the argument sent to the page (using $_GET[]) and then send this with the url called in the smarty. Can I maybe make a user defined tag that reads the argument and then somehow call the embed with the proper url? I’m grateful for any thought or ideas on this.
...and please keep the level of explanations simple as I’m totally novice on php
/David
-
jelle
Re: Linking to topic in embedded forum?
does not rhime with:Could something like this technically be achieved? If so could the embed tag easily be modified to do something like that?
Why don't you take this chance to learn? As far as I can see you only need to change one file....and please keep the level of explanations simple as I'm totally novice on php
One way to accomplish it is to add an extra parameter that signals the name of the parameter that should be appended to the url. But you will have to do your own coding (or you could pay me to do it for you).
-
davidL
Re: Linking to topic in embedded forum?
Dude, I’m not sure how to interpret your post. Whats your point about rhyming? In the first statement I’m asking a question. In the second I am pleading for that any answers I get to be written in a technically simple way so that I with my low knowledge can understand them. What is not rhyming?
Your first post told med how to read the argument. That’s probably a simple explanation, but to someone like me it raised questions such as where to put the “$_get” and how I could pass the argument further to the embed function. I wondered if it should be put inside the {embed} brackets , in a user defined tag or in the embed function itself. After testing I managed to read the argument in a user defined tag so I thought this was somehow the way to do it, but then I could not figure out if it was possible to call embed smarty from there. What I did not realize then was that reading argument can be done directly in the function.embed.php.

Anyway to get back on topic. After your post yeasterday I realized that I probably could read the argument directly in function.embed.php and then it became quite easy to figure out what to do. After playing with the code I even managed to get the embed tag to work both conventionally and to accept arguments of part url or even taking the entire url as an argument. I have now used this to link random gallery thumbnails on my first page to the specific images in my embed gallery. Works pretty sweet.
Thank you for the help jelle
/David
Your first post told med how to read the argument. That’s probably a simple explanation, but to someone like me it raised questions such as where to put the “$_get” and how I could pass the argument further to the embed function. I wondered if it should be put inside the {embed} brackets , in a user defined tag or in the embed function itself. After testing I managed to read the argument in a user defined tag so I thought this was somehow the way to do it, but then I could not figure out if it was possible to call embed smarty from there. What I did not realize then was that reading argument can be done directly in the function.embed.php.
Yes certainly, but part of the learning process means asking questions. In order to walk one might need help to get on the feetWhy don't you take this chance to learn?
Anyway to get back on topic. After your post yeasterday I realized that I probably could read the argument directly in function.embed.php and then it became quite easy to figure out what to do. After playing with the code I even managed to get the embed tag to work both conventionally and to accept arguments of part url or even taking the entire url as an argument. I have now used this to link random gallery thumbnails on my first page to the specific images in my embed gallery. Works pretty sweet.
Thank you for the help jelle
/David
Re: Linking to topic in embedded forum?
I am having the same difficulty using the {pi_iframe} tag.
I need to link to several pages which use additional paramaters to define what you get. The tag I have been trying to use is {pi_iframe width=100% url=http://www.ndpa.info/cgi-bin/gb/powerbook.cgi?book=news} however I get the error
If I take out the ?book=news it takes me directly to the guestbook and not the news.
In total I have about 30 different links I need to add to the site using the iframe, embed or pi_frme markup and would welcome some assistance with this.
The pages appear fine on their own from straight links :-
http://www.ndpa.info/cgi-bin/gb/powerbook.cgi?book=news
http://www.ndpa.info/cgi-bin/gb/powerbook.cgi
etc....
I need to link to several pages which use additional paramaters to define what you get. The tag I have been trying to use is {pi_iframe width=100% url=http://www.ndpa.info/cgi-bin/gb/powerbook.cgi?book=news} however I get the error
Code: Select all
Fatal error: Smarty error: [in content:content_en line 1]: syntax error: invalid attribute name: '=' (Smarty_Compiler.class.php, line 1524) in /home/fhlinux193/n/ndpa.info/user/htdocs/lib/smarty/Smarty.class.php on line 1088In total I have about 30 different links I need to add to the site using the iframe, embed or pi_frme markup and would welcome some assistance with this.
The pages appear fine on their own from straight links :-
http://www.ndpa.info/cgi-bin/gb/powerbook.cgi?book=news
http://www.ndpa.info/cgi-bin/gb/powerbook.cgi
etc....
Last edited by CMSMS-Fan on Wed Mar 08, 2006 1:43 am, edited 1 time in total.
Often Ignored but never forgotten
-
jelle
Re: Linking to topic in embedded forum?
@David: Sorry If I reacted a bit grumpy. But you got there in the end and learnt something on the way. Would you mind posting the code you added or changed?
@Hutton: I guess that the second '=' throws things off. see if you can escape it with:
http%3A//www.ndpa.info/cgi-bin/gb/powerbook.cgi%3Fbook%3Dnews
@Hutton: I guess that the second '=' throws things off. see if you can escape it with:
http%3A//www.ndpa.info/cgi-bin/gb/powerbook.cgi%3Fbook%3Dnews
Re: Linking to topic in embedded forum?
Thanks for the reply but it still gives the same error.
{pi_iframe width=100% url=http%3A//www.ndpa.info/cgi-bin/gb/powerbook.cgi%3Fbook%3Dnews}
There is obviously a problem with passing the additional paramaters.
{pi_iframe width=100% url=http%3A//www.ndpa.info/cgi-bin/gb/powerbook.cgi%3Fbook%3Dnews}
There is obviously a problem with passing the additional paramaters.
Often Ignored but never forgotten
Re: Linking to topic in embedded forum?
Thanks Jelle,
I have been nights so have not had the time to play about but you are absolutley right that is all it needed to be Quoted.
This code works without any additions:-
The only difference is it can only be entered in source as using the WYSIWG changes the url into a hyperlink automaticly.
I have been nights so have not had the time to play about but you are absolutley right that is all it needed to be Quoted.
This code works without any additions:-
Code: Select all
{pi_iframe width=100% height=500px url="http://www.ndpa.info/cgi-bin/gb/powerbook.cgi?book=news"}Often Ignored but never forgotten

