Zudane
|
Action portalI had a question on the action portal, I was unable to find a guide about how to use it really, so I have to ask.
Basically I want a link that allows users to view a confirmation page and click a link (actions portal link) that will add them to the group.
I've got it set-up like this:
Are those settings correct? And what would the link be to use them, using /action.php and /actions.php both give me a 404.
|
admin (no pm's please)
|
Screenshots that squeeze text to illegibility are not a good idea.
|
Zudane
|
Sorry, auto resize with the attach, should be readable if you click on it.
|
admin (no pm's please)
|
It is still squashed.
|
Zudane
|
There, updated.
|
admin (no pm's please)
|
Text still squashed.
|
Zudane
|
Sorry, forgot to turn off the resize.
|
admin (no pm's please)
|
What is the 51 doing in the amount field
|
Zudane
|
With the "Join to group (amount)" I assumed that the amount would be the group ID.
|
admin (no pm's please)
|
That needs to be the groupname, but I am not clear how you expect to get a dialog to appear?
|
Zudane
|
I don't think it's that clear in there. Especially since it says to check the modactions portal - which is bb2 only right now.
|
admin (no pm's please)
|
I think you are trying to do something that just is not catered for.
|
Zudane
|
In another thread you had said that you could allow access with the trigger being post count equal to a certain number.
I would assume that you could click a link for the same result.
|
admin (no pm's please)
|
I think I get you, you want to do a javascript dialog and access the link following that dialog being answered.
That should work.
Try it in phases, e.g. a dialog that will call an ACTION that adds to a profile field, once that works try it with the group.
|
Zudane
|
What do you mean by doing that?
Coding is something I haven't done too much in a long time, so I'm still rusty on it.
|
admin (no pm's please)
|
In that case I'd suggest waiting for a guide. I will try and write one.
|
Zudane
|
Many thanks.
Oh, and as for what I had thought of before, to let non-group users view a page to either join or decline the group to view the forum, I thought of an easier way. Make 2 forums with the same name and description, one viewable by people not in the group, one viewable by people in the group. Click the non-group forum and all you get is the page that tells you you need to join.
|
admin (no pm's please)
|
When people join such a group they would see two forums.
|
admin (no pm's please)
|
Thinking this through, one can either go for dis-proportionally complex, or one can stick a "join" link in the forum description.
|
admin (no pm's please)
|
I have this working now, it needed a code tweak and there is a cosmetic to deal that can be approach in a few possible ways so I'm still thinking a bit.
|
admin (no pm's please)
|
Here is javascript code that should not currently be used as it does need a little tweak deployed to the live servers for it to work:
| Code: |
function LoadPage(page) {
// Set up request varible
try {xmlhttp = window.XMLHttpRequest?new XMLHttpRequest(): new ActiveXObject("Microsoft.XMLHTTP");} catch (e) { alert("Error: Could not load page.");}
//send data
xmlhttp.onreadystatechange = function(){
//Check page is completed and there were no problems.
if ((xmlhttp.readyState == 4) && (xmlhttp.status == 200)) {
//Write data returned to page
//document.getElementById(usediv).innerHTML = xmlhttp.responseText;
}
}
xmlhttp.open("GET", page);
xmlhttp.send(null);
//Stop any link loading normaly
return false;
}
function joinHidden()
{
if(confirm('Join the group?'))
{
//var newwin = window.open("action.php?component=ACTIONS&action=JOINGROUP&send=1","JOINGROUP");
//document.write('<iframe height="0" width="0" src="action.php?component=ACTIONS&action=JOINGROUP&send=1","JOINGROUP" />');
LoadPage("action.php?component=ACTIONS&action=JOINGROUP&send=1");
//newwin.close(); // THIS WILL NOT WORK
}
}
|
The code illustrates javascript calling an action and showing the result in one of three ways.
1) A new browser window. Note that due to the asynchronous nature of javascript here, if you try and close the window to get the action without the display, then the chances are the action will fail as the url will not be called.
2) loading the result into a frame.
3) Loading the page invisibly with an AJAX call.
Approaches 1 & 2 are good for debugging.
|
admin (no pm's please)
|
code now operational on the server:
if my forum description I have:
| Code: |
Click to <a href="javascript:void(0)" onClick="joinHidden()">join</a> this forum
|
and I have made the forum private, but created a group called "hidden" that can see into the forum.
|
Zudane
|
Well, I mostly understand, except that I don't see where the group is chosen, or exactly how I should implement it.
|
admin (no pm's please)
|
Screenshot changed
|
Zudane
|
was that code tweaked for live forum use?
You said it's not ready yet.
And phpbb3 doesn't have "Poster/current user"
So should it be "selected/registering member"?
|
admin (no pm's please)
|
Lost track of the fact this is phpbb3 you are talking about
There is still no action.php possible in phpbb3 at all.
It's on the list.
|
Zudane
|
much ado about nothing then, eh?
Ah well.
Why is there an actions portal if we can't use the php link yet?
|
admin (no pm's please)
|
because the actions portal does a lot without the part that accesses it directly.
|
Zudane
|
Okay, I was going to use the other idea of just two forums, and I have the views set correctly, and the action portal is set correctly as well, as far as I know:
I also tried with the group ID number as the amount, but both gave the same error when posting only in that forum:
| Quote: | | Fatal error: Call to undefined function: get_groupid() in /home/httpd/vhosts/ford.myfunforum.org/httpdocs/phpBB3/myffcms/functions_cms.php on line 999 |
Perhaps it's because I am on fastforum, not funforum? (Unless you moved it...)
As well, I wouldn't mind the forum being moved to new server, as ford is lagging, takes some time to change pages sometimes.
|
admin (no pm's please)
|
As I said phpbb3 needs work in this area.
|
Zudane
|
Alrighty.
Let me know when it's done ^_^
|
admin (no pm's please)
|
I have now run a successful join group action in phpbb3 via the action.php code.
This is all installed on the live servers.
|
Zudane
|
does it need javascript?
|
admin (no pm's please)
|
There's more than one way to skin a cat!
I have only tested in phpbb3 by calling the portal link directly. It would be more elegant to use javascript.
|
Zudane
|
Got it up and workin now!
Thanks!
|
|
|