Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 06-10-2012, 10:41 PM
kapii kapii is offline
 
Join Date: Apr 2008
Posts: 95
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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
Reply With Quote
  #2  
Old 06-10-2012, 11:31 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Did you put in a bug report about this?
Reply With Quote
  #3  
Old 06-10-2012, 11:35 PM
kapii kapii is offline
 
Join Date: Apr 2008
Posts: 95
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #4  
Old 06-11-2012, 10:30 AM
nhawk nhawk is offline
 
Join Date: Jan 2011
Posts: 1,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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'
Reply With Quote
Благодарность от:
Simon Lloyd
  #5  
Old 06-11-2012, 10:48 AM
Simon Lloyd's Avatar
Simon Lloyd Simon Lloyd is offline
 
Join Date: Aug 2008
Location: Manchester
Posts: 3,481
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm soooo glad i haven't moved to vb4 beta wonder if vb5 will still be in constant beta mode?
Reply With Quote
  #6  
Old 06-11-2012, 11:41 AM
kapii kapii is offline
 
Join Date: Apr 2008
Posts: 95
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by nhawk View Post
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
Reply With Quote
  #7  
Old 06-11-2012, 02:58 PM
nhawk nhawk is offline
 
Join Date: Jan 2011
Posts: 1,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kapii View Post
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.
Reply With Quote
  #8  
Old 06-11-2012, 03:02 PM
kapii kapii is offline
 
Join Date: Apr 2008
Posts: 95
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #9  
Old 06-11-2012, 03:10 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kapii View Post
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.
Reply With Quote
  #10  
Old 06-11-2012, 03:13 PM
kapii kapii is offline
 
Join Date: Apr 2008
Posts: 95
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:59 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.04267 seconds
  • Memory Usage 2,264KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (1)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (10)post_thanks_box
  • (1)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete