vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Navigation Manager (https://vborg.vbsupport.ru/showthread.php?t=284272)

kapii 06-10-2012 10:41 PM

Navigation Manager
 
For some unknow reason, in 4.2 with the Navigation Manager if you delete a item, it leaves behind the record in the navigation table and in the phrase table.

I have found a way to delete the record in the navigation table by adding this code via a plugin to the navigation_admin_dodelete hook.
PHP Code:

if ($_REQUEST['do'] == 'dodelete')
{
$vbulletin->input->clean_array_gpc('r', array(
    
'navid'    => TYPE_UINT,
    
'tabid'    => TYPE_UINT
));

$db->query_write("
    DELETE FROM " 
TABLE_PREFIX "navigation
    WHERE navid = " 
$navelement['navid'] . "
"
);


But I have not been able to come up with a way to delete the phrase record, if anybody can help me out it would be greatly appreciated.

Thanks

Lynne 06-10-2012 11:31 PM

Did you put in a bug report about this?

kapii 06-10-2012 11:35 PM

Hi Lynne their is already something in JIRA http://tracker.vbulletin.com/browse/VBIV-15177

But that don't help me at the moment.

Thanks

nhawk 06-11-2012 10:30 AM

I'm the one that filed that report and just about fell out of my chair when I saw it marked "As designed" and "Resolved".

I would have to double check it, but the reason you can't delete the phrase is there isn't any id that links them to the navigation item. You need to know the full name of the phrase and delete it using that phrase.

The standard phrases for navigation items are...

Code:

FOR MENUS:        vb_navigation_menu_' . $name . '_text'
FOR TABS:        vb_navigation_tab_' . $name . '_text'
FOR LINKS:        vb_navigation_link_' . $name . '_text'


Simon Lloyd 06-11-2012 10:48 AM

I'm soooo glad i haven't moved to vb4 beta :) wonder if vb5 will still be in constant beta mode?

kapii 06-11-2012 11:41 AM

Quote:

Originally Posted by nhawk (Post 2338675)
I'm the one that filed that report and just about fell out of my chair when I saw it marked "As designed" and "Resolved".

I would have to double check it, but the reason you can't delete the phrase is there isn't any id that links them to the navigation item. You need to know the full name of the phrase and delete it using that phrase.

The standard phrases for navigation items are...

Code:

FOR MENUS:        vb_navigation_menu_' . $name . '_text'
FOR TABS:        vb_navigation_tab_' . $name . '_text'
FOR LINKS:        vb_navigation_link_' . $name . '_text'


Right, but how would I add that to my delete code to remove the phrase when it removes the item from the navigation table, if it is even possible?

Thanks :)

nhawk 06-11-2012 02:58 PM

Quote:

Originally Posted by kapii (Post 2338702)
Right, but how would I add that to my delete code to remove the phrase when it removes the item from the navigation table, if it is even possible?

Thanks :)

Get the name from the navigation table prior to deleting it. Then use the name (varname) to delete the phrase from the phrase table.

kapii 06-11-2012 03:02 PM

I tried something like that but I don't think I write it correctly, when I would delete a item via the navigation manager, it would delete the item in the db just fine but not the phrase, so I don't know how to code it to do that.

Lynne 06-11-2012 03:10 PM

Quote:

Originally Posted by kapii (Post 2338744)
I tried something like that but I don't think I write it correctly, when I would delete a item via the navigation manager, it would delete the item in the db just fine but not the phrase, so I don't know how to code it to do that.

Post your code so we can try to see what was wrong.

kapii 06-11-2012 03:13 PM

Hi Lynne, actually I tried so many different things I deleted the whole thing and then just wrote the part to remove the item from the navigation table. I know that don't help you but I tried looking back on my text files and don't have what I wrote anymore. :(


All times are GMT. The time now is 08:30 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01297 seconds
  • Memory Usage 1,734KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete