Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 07-06-2008, 05:44 PM
almannai almannai is offline
 
Join Date: Oct 2007
Posts: 889
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default show newthread or newreply button in hack

Hi,

I have this situation where the hack need to check if the user can post new thread or new reply depending on the displayed page. So on forums page the new thread button will be shown and on the thread page the new reply button will be show. With forcing the permissions of the forum or the user. Like if the forums does not allow post the new thread button shouldn't be displayed.

like this code in a plugin

if(allow new post)// What it should be written here-the condition
{
//do this
}else if (allow new reply)// What it should be written here
{
//do other thing
}

Regards,
Reply With Quote
  #2  
Old 07-07-2008, 06:13 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Where are you hooking your plugin?
Reply With Quote
  #3  
Old 07-07-2008, 06:20 AM
almannai almannai is offline
 
Join Date: Oct 2007
Posts: 889
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dismounted View Post
Where are you hooking your plugin?
global_start

--------------- Added [DATE]1215427224[/DATE] at [TIME]1215427224[/TIME] ---------------

Anybody?

Also why plugin programming is poorly documented.

I looked at plugin system documentation and nothing there.

Programmer need to know variables list used by vbullettin like a list of $show variable and what each one will be used for.

Articles defiantly not enough, but sure it will help a bit.

Am' I the only one who is facing this problem, or this is a known issue by the rest!!!

Regards,
Reply With Quote
  #4  
Old 07-11-2008, 03:46 PM
almannai almannai is offline
 
Join Date: Oct 2007
Posts: 889
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

First I would like to thank everybody have read this thread and Dismounted for his post.

I've decided to use the following for newthread and newreply in my hack template but still not working
<if condition="$show['newthreadlink']">
<if condition="$show['largereplybutton']">

but the following are working
<if condition="$show['searchbuttons']">
<if condition="$show['registerbutton']">

can anybosy explain why?
Reply With Quote
  #5  
Old 07-12-2008, 05:51 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Most likely, those variables are not set. Look in the vBulletin files to find where they are set. (A mass search tool would be useful.)
Reply With Quote
  #6  
Old 07-15-2008, 07:25 AM
almannai almannai is offline
 
Join Date: Oct 2007
Posts: 889
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dismounted View Post
Most likely, those variables are not set. Look in the vBulletin files to find where they are set. (A mass search tool would be useful.)
Thank you Dismounted for your follow-ups.

The
<if condition="$show['newthreadlink']">
<if condition="$show['largereplybutton']">

Are taken directly from forumdisplay template and showthread template and they are working on my forum but not on the hack.

Anyway now 'am using
<if condition="THIS_SCRIPT == 'forumdisplay'">
I know this is not the best choice but this is the only working one.

Once I post the hack I will inform you here to have a look at it.

Regards,
Reply With Quote
  #7  
Old 07-17-2008, 01:11 PM
almannai almannai is offline
 
Join Date: Oct 2007
Posts: 889
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here is the hack
https://vborg.vbsupport.ru/showthread.php?t=185403
that
<if condition="$show['newthreadlink']">
<if condition="$show['largereplybutton']">

was not working in it
Reply With Quote
  #8  
Old 07-18-2008, 07:04 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you are having problems with a modification, please contact the author or post in the modification thread for help.
Reply With Quote
  #9  
Old 07-18-2008, 08:53 AM
almannai almannai is offline
 
Join Date: Oct 2007
Posts: 889
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dismounted View Post
If you are having problems with a modification, please contact the author or post in the modification thread for help.
I'm the auther of that hack..

That's why am asking why that two conditions are not working were they should.
Reply With Quote
  #10  
Old 07-18-2008, 09:06 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Again - check if the variable exists where you're using it.
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 12:04 AM.


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.04616 seconds
  • Memory Usage 2,247KB
  • 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
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (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_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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete