Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
how to add 2 links to a piece of code which is actually in me.php
jackmaessen
✭✭✭
In the file applications/dashboard/views/modules/me.php there is this piece of code:
if ($Session->checkPermission('Garden.Users.Approve')) { echo wrap(Anchor(sprite('SpApplicants').' '.t('Applicants').$CApplicant, '/dashboard/user/applicants'), 'li', array('class' => 'link-applicants')); } if ($Session->checkPermission(array('Garden.Settings.Manage', 'Garden.Moderation.Manage', 'Moderation.ModerationQueue.Manage'), false)) { echo wrap(Anchor(sprite('SpSpam').' '.t('Spam Queue').$CSpam, '/dashboard/log/spam'), 'li', array('class' => 'link-spam')); } if ($Session->checkPermission(array('Garden.Settings.Manage', 'Garden.Moderation.Manage', 'Moderation.ModerationQueue.Manage'), false)) { echo wrap(Anchor(sprite('SpMod').' '.t('Moderation Queue').$CModeration, '/dashboard/log/moderation'), 'li', array('class' => 'link-moderation')); } if ($Session->checkPermission(array('Garden.Settings.View', 'Garden.Settings.Manage'), false)) { echo wrap(Anchor(sprite('SpDashboard').' '.t('Dashboard'), '/dashboard/settings'), 'li', array('class' => 'link-dashboard')); }
This is the right place to add 2 links more to it:
echo Wrap(Anchor(Sprite('SpUpload').' '.T('Upload'), '/mods-upload'), 'li'); echo Wrap(Anchor(Sprite('SpOutbound').' '.T('Contact Outbound'), '/outbound-contact'), 'li');
But because it is a core file, i do not wnt to add these links here. How can i achieve the same reslut without modifying me.php?
0
Comments
Hi jack,
Copy the file and move it into a folder /views/modules/ inside your theme folder.
Should look like that with the default theme:
vanilla-root/themes/default/views/modules/me.php
this works great @phreak Thanks for the solution
Nice! You're welcome.
You have a hook
FlyoutMenu
It is much better to use hooks rather then view overrides becuase of updates. Create a themehook file (search for examples) and put this method in your class.
grep is your friend.
Hi everyone, Can somebody help with this? How can I make a link a php file in html code? It will be write out the database entries. The php code works fine standalone but if I make a "a href" only a few parameters write out on the new html site. I'm confused....