I am trying to make a link to the members info page because the link in the sublinks is just too small to notice. In fact I only just discovered it existed today after all this time of trying to make a second profile page :( (its to damn small for people to notice)
So i decided to make an action using this link from the members profile page 'profile_info.php?ID={profileID}.' This is the same link in the navigation menu that takes you to that particular members info right, but no! instead its sending me to my own info. its starting to drive me mad! Dolphin is driving me mad! I am sure I am driving you lot mad! But, that said, how do I make a link to view members info?
|
I suggest you hire a developer to help you build your site. Geeks, making the world a better place |
I suggest not! I have come this far on my own I'll bloody well finish it on my own. If you don't want to help thats fine by me just refrain from commenting. |
bleeding hell. LOL. I just thought that hiring a developer would decrease the time to market. However, I can understand wanting to accomplish it with a little help from the community. I suggested a module from the market; Modzzz may be the only active one at the moment, to help with doing actions. I still suggest you buy that actions manager module. Geeks, making the world a better place |
Sorry if I was short last night it was 2am and I was soooooo tired trying to figure stuff out. I already have modzz action manager its a great little tool. I am just having trouble connecting the link to the persons profile. The problem with these tools is you still actually have to know what scripts and code to actually put into them.
I have put in
=============================
({ID} != {member_id}) return;
return _t('View My Info');
==============================
into the eval field
and
=============================
profile_info.php?ID={profileID}
===============================
into the url field. I think the url is correct because this is the url used in the navigation menu to take you to the profile info. but I think the eval field is wrong, if anyone can understand this.
|
If you click the action button and it takes you to your profile info, then you know the member ID it is grabbing is your own. You will have to grab the member ID of the profile you are viewing. Geeks, making the world a better place |
The reason it does not work is this.
The key {profileID} your assuming is available for use anywhere. The problem is it is not. This is a common mistake that non dolphin developers make when they see keys like this no matter where they are used, people think they are globally available which they are not.
That key is available for use in the functions that generate the main menu and then only when on a profile page where that id becomes available.
However the key {profileID} is not available for use for the action buttons.
Reason is those keys are merely markers that areas of the dolphin script looks for and replaces with the appropriate value when it sees them. The script has to be programed to look for those keys otherwise they do not get processed. And because the part of the dolphin code that processes action buttons is not looking for that key, it does not get processed.
So basically your trying to do something that can't be done without a code modification to get the action processing to deal with a key it is normally not looking for. https://www.deanbassett.com |
. The problem with these tools is you still actually have to know what scripts and code to actually put into them.
OK, I managed to code this in a minute using my actions manager module. It can be done; however, yes, you need to know how Dolphin works, the classes and functions. There is some information on the classes and functions built into Dolphin; I can not find the URL at the moment, perhaps one of the long time guys know.
Geeks, making the world a better place |
I learned Dolphin just as you are now, by asking questions and begging for help.
First, understand what the {evalResult} means. That means to insert the results of the evaluation.
Geeks, making the world a better place |
I already mentioned that you have to grab the member ID from the profile page; search on getID(). Geeks, making the world a better place |
If I can't put it into an action then my next step would be to make a php quick link. |
$profileID = getID($_GET['ID']);
$aUserData = getProfileInfo($profileID);
$sNickName= $aUserData['NickName'];
echo $sNickName;
$html =<<<HTML
<div class="boxContent" style="padding:5px; text-align: center;">
<div class="clear_both"></div>
<div class="dbContent">
<a style="text-decoration:none" href="profile_info.php?ID={profileID}">
<button class="bx-btn" style="0px 5px 0px 5px; margin-right:10px;" type="button">TEST TEST</button>
</a>
</div>
<div class="clear_both"></div>
</div>
HTML;
echo $html;
I don't get it at all, I understand what you are saying about needing to identify the Key which is the profile id but I have no idea on this earth how to fit the url and the frickin key together so they make a link. This is byond my scope I might just give up on this tbh
|
Tdddaaarrrr!!!!!!!!!!! I did it! Thanks for all your help. I made php block and stuck this code in here. The $profileID kept throwing me tho. But as a side note, as I was doing this I found out how to put the profiles name in a title on the page using the echo $sNickName; function (if thats what it is lol)
=======================================
$profileID = getID($_GET['ID']);
$aUserData = getProfileInfo($profileID);
$sNickName= $aUserData['NickName'];
$html =<<<HTML
<div class="boxContent" style="padding:5px; text-align: center;">
<div class="clear_both"></div>
<div class="dbContent">
<a style="text-decoration:none" href="profile_info.php?ID={$profileID}"><button class="bx-btn" style="0px 5px 0px 5px; margin-right:10px;" type="button">View More Info for $sNickName</button>
</a>
</div>
<div class="clear_both"></div>
</div>
HTML;
echo $html;
===============================================
|
You did not accomplish the action but I guess you did learn something.
$profileID = getID($_GET['ID']); return $profileID;
That is the evaluation to get the profile ID of the profile being viewed.
So the URL becomes
profile_info.php?ID={evalResult}
That is all you had to do to create the action button.
Geeks, making the world a better place |
By the way, keep at learning Dolphin, we need more geek girls on the forum  Geeks, making the world a better place |
we need more geek girls on the forum
One's enough!
My opinions expressed on this site, in no way represent those of Boonex or Boonex employees. |
LOL. I must be tired. I did not even think of that.
I was only thinking of having to modify code to get a new key processed. I did not even think of using the eval to get the ID instead.
Of course, that prevents the use of the eval to show or hide the button based on things like not showing the button only to members because the eval can be used only for one of the fields so the caption field would have to be set to something which will show it to everyone, including guests. But as long as that flexibility is not needed, then it would work perfectly.
https://www.deanbassett.com |
Mmm, instead of using the URL one probably could code something in the script section to prevent guest viewing and use onclick to take the person to the profile view page. It I was interested, I might actually play with this but I have more pressing things to take care of. Perhaps someone else might want to play with it. Geeks, making the world a better place |