PDA

View Full Version : show newthread or newreply button in hack


almannai
07-06-2008, 05:44 PM
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,

Dismounted
07-07-2008, 06:13 AM
Where are you hooking your plugin?

almannai
07-07-2008, 06:20 AM
Where are you hooking your plugin?

global_start

--------------- Added 1215427224 at 1215427224 ---------------

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,

almannai
07-11-2008, 03:46 PM
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?

Dismounted
07-12-2008, 05:51 AM
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.)

almannai
07-15-2008, 07:25 AM
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,

almannai
07-17-2008, 01:11 PM
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

Dismounted
07-18-2008, 07:04 AM
If you are having problems with a modification, please contact the author or post in the modification thread for help.

almannai
07-18-2008, 08:53 AM
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.

Dismounted
07-18-2008, 09:06 AM
Again - check if the variable exists where you're using it.

almannai
07-18-2008, 10:24 AM
Again - check if the variable exists where you're using it.

how to do that?

Dismounted
07-19-2008, 03:53 AM
var_dump($var);