[HOW TO] Integrate a CSS dropdown Menu into phpBB Styles

How-to's, little tricks, tutorials, code examples (snippets) and read-me's.

Re: [HOW TO] Integrate a CSS dropdown Menu into phpBB Styles

Postby elephantspike » 11 Oct 2011, 22:57

Nice styling on that board. I'm using Absolution for my default style now.

One little glitch this fix is causing on my board: The links on people's profile pages to send that user a pm are not working now only when your changes are applied to includes/functions.php. Instead of going to /ucp.php?i=pm&mode=compose&u=XXXXXX they are just going to /ucp.php?i=pm. I know it just needs something added to those append sid() rules to fix it but I don't know how to code it. This is the html part that I'm pretty sure that link is in from memberlist_view.html:


Code: Select all
<!-- IF U_PM --><dt>{L_PM}:</dt> <dd><a href="{U_PM}">{L_SEND_PRIVATE_MESSAGE}</a></dd><!-- ENDIF -->


I can see why it does this, I think. The new append sid rules say tha {U_PM} always goes to the exact same page without any variables allowed, right?
User avatar
elephantspike    
Supporter
Supporter
 
Posts: 11
Joined: 14 Mar 2007, 18:46
Favorite Team: Red Sox
Gender: Male
phpBB Knowledge: 5




phpBB Academy at StarTrekGuide
Support STG
Using PayPal Donate

Re: [HOW TO] Integrate a CSS dropdown Menu into phpBB Styles

Postby elephantspike » 12 Oct 2011, 09:15

OK, I fixed it by changing the U_PM in your mod code to UCP_PM in includes/functions.php and in styles/template/overall_header.html. Now the header link goes to the PM main page and the user profile one goes to the compose PM page with that user's name already filled in.

I hope I didn't break something else with this fix. Is UCP_PM used anywhere else? Would it be best to change all the new ones to a UCP_ prefix just to stay consistent?
User avatar
elephantspike    
Supporter
Supporter
 
Posts: 11
Joined: 14 Mar 2007, 18:46
Favorite Team: Red Sox
Gender: Male
phpBB Knowledge: 5

Re: [HOW TO] Integrate a CSS dropdown Menu into phpBB Styles

Postby Sniper_E » 12 Oct 2011, 15:08

Cool elephantman, I changed all of those links and added the UCP_ to them. That was a conflict. Thanks for the heads up! No, I don't think 'U_UCP_PM' is used anywhere else.

[ Post made via HTC Inspire] Image
Image
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!
User avatar
Sniper_E    
STG Jedi Master
STG Jedi Master
 
Posts: 6984
Joined: 31 May 2006, 06:29
Location: Shreveport, LA
Favorite Team: The STG Team
Gender: Male
phpBB Knowledge: 6

Re: [HOW TO] Integrate a CSS dropdown Menu into phpBB Styles

Postby elephantspike » 14 Oct 2011, 00:23

Hey Sniper! Wow. I'm actually helping to develop a MOD. :D

So I'm trying to add a link under MCP to bring moderators to the Gallery mcp Overview page (a link to this seems to be conspicuously missing from the Gallery MOD). I got the link in the menu as a hover-over "class=icon-link" sub-menu, but it only works(goes to the correct URL: /album/mcp.php?mode=overview) if you click on it from the gallery page. From any other page, it tries to go to /forum/mcp.php?mode=overview

This is what I put in includes/functions.php (I think it may need to go in one of the includes/gallery files instead?):

Code: Select all
'U_MCP_GALLERY'                     => append_sid("{$gallery_root_path}mcp.$phpEx", 'mode=overview'),


I tried changing the {$gallery_root_path} to {$phpbb_root_path} but that just made it try to go to forum/mcp.php?mode=overview everywhere, even from the gallery.

There are a few edits from the Gallery MOD in functions.php, too, but my elephant sense is saying that's not it. It either has to go in a includes/gallery file somewhere or something needs to be changed in it.
User avatar
elephantspike    
Supporter
Supporter
 
Posts: 11
Joined: 14 Mar 2007, 18:46
Favorite Team: Red Sox
Gender: Male
phpBB Knowledge: 5

Re: [HOW TO] Integrate a CSS dropdown Menu into phpBB Styles

Postby Sniper_E » 14 Oct 2011, 01:06

I don't know what your gallery mod uses for its links but it sounds like they are interfering with the normal ucp and mcp links.

Would that mcp link for the gallery be like this:
Code: Select all
        'U_MCP_GALLERY'        => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=gallery&amp;mode=overview'),

I'm not sure how it links. Look in the install directions of that mod and see how he added the link for the mcp gallery.
Or go into the mcp and click on the gallery tab to see what link it takes you to.


I'm doing a full mcp dropdown now but I don't have all of those links setup yet to share with you. It would be a nice addition to this dropdown menu also.

Sneak preview...
tab_menu_moderator.gif

[ Post made via HTC Inspire] Image
Image
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!
User avatar
Sniper_E    
STG Jedi Master
STG Jedi Master
 
Posts: 6984
Joined: 31 May 2006, 06:29
Location: Shreveport, LA
Favorite Team: The STG Team
Gender: Male
phpBB Knowledge: 6

Re: [HOW TO] Integrate a CSS dropdown Menu into phpBB Styles

Postby elephantspike » 14 Oct 2011, 11:44

Sniper_E wrote:Would that mcp link for the gallery be like this:
Code: Select all
        'U_MCP_GALLERY'        => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=gallery&amp;mode=overview'),


Nope. Tried that. that makes it try to go to forum/mcp. It needs to go to album/mcp


Sniper_E wrote:Or go into the mcp and click on the gallery tab to see what link it takes you to.

There is no gallery tab in the MCP. That's why I'm trying to add one in the header menu. The Gallery MCP is a separate thing from the board mcp.

I think I found it though, but not sure how to apply it here. From gallery/includes/integration.php:

Code: Select all
global $phpbb_root_path, $phpEx, $template, $user;

      $user->add_lang('mods/info_acp_gallery');
      phpbb_gallery_plugins::init(phpbb_gallery_url::path('gallery'));
      $template->assign_var('U_GALLERY_MOD', phpbb_gallery_url::append_sid('index'));
   }
User avatar
elephantspike    
Supporter
Supporter
 
Posts: 11
Joined: 14 Mar 2007, 18:46
Favorite Team: Red Sox
Gender: Male
phpBB Knowledge: 5

Re: [HOW TO] Integrate a CSS dropdown Menu into phpBB Styles

Postby mladiucitelj » 06 Aug 2012, 09:33

Hi!

Is it possible to give instructions for prosilver on one place? I would really like to have this manu on my board, but don't know much coding... :$
mladiucitelj
Cadet I
Cadet I
 
Posts: 17
Joined: 23 Jan 2011, 15:44
Gender: Male

Previous

Return to Tutorials and How-Tos

Who is online

Users browsing this forum: No registered users and 7 guests

cron