vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Post Award Hack 1.2 (https://vborg.vbsupport.ru/showthread.php?t=69198)

Blam Forumz 09-21-2004 03:22 PM

Nope

all i see EVER is remove award

Abe1 09-21-2004 08:36 PM

Quote:

Originally Posted by Blam Forumz
Nope

all i see EVER is remove award

Please make sure you copy what has to go into template 'postbit' was copied correctly.

Dan 09-21-2004 09:07 PM

Interesting item :) I might consider using this if I can find a very good use for it.

Blam Forumz 09-22-2004 02:46 PM

whoops *looks embarressed* forgot to run the query :x

speddy 09-24-2004 04:04 PM

this is strange

i have added the hack no problems

i add an award however the image does not show.

yes i have placed it into the images/misc folder as stated

i duuno why it dont show
dont seem to matter where i place t

any ideas

turbidblue 09-24-2004 07:52 PM

Quote:

Originally Posted by speddy
this is strange

i have added the hack no problems

i add an award however the image does not show.

yes i have placed it into the images/misc folder as stated

i duuno why it dont show
dont seem to matter where i place t

any ideas

That was a problem I was having, but I figured mine out. I have a custom skin installed, so I had to add the award image to the customskin/misc folder...it worked flawlessly :)

[high]* turbidblue clicks install!
[/high]

:)

TTG 09-24-2004 08:20 PM

Useful .. all members will now be wanting an award :)

Clicked install

ambrosious 09-28-2004 12:38 AM

Quote:

Originally Posted by Abe1
In the changes I said to make in the postbits,
Find:
PHP Code:

$bbuserinfo['usergroupid'] == '6' 

Replace with:
PHP Code:

$bbuserinfo['usergroupid'] == '6' OR $bbuserinfo['usergroupid'] == '7' 


So, that would let my, say "Supporters" group give awards, if I wanted... I just change the magic "7" to the appropriate number...

Is that right?

Abe1 10-05-2004 08:09 PM

Quote:

Originally Posted by ambrosious
So, that would let my, say "Supporters" group give awards, if I wanted... I just change the magic "7" to the appropriate number...

Is that right?

Yes. That's it.

Lionel 10-07-2004 04:32 AM

It would be nice to be able to run a query to select all awarded posts and display them on a page as "Editor's Pick". Does anyone know how to run such a query?

bonnmac 10-07-2004 07:59 PM

i installed it and on half of my skink the img dose not show up the other half they do what could be the problem??

theArchitect 10-09-2004 05:47 AM

Quote:

Originally Posted by Abe1
There is no need for phrases right now. I most-probably will implement them in next version.

Is it possible to add the facility to search for awarded posts. I know that one can view the awarded posts from within a users profile, but if someone logs on to the forum, could they search for all awarded posts rather than for latest posts etc?

Lionel 10-09-2004 11:24 PM

surely someone can help me with that simple add-on. I started but it is pulling only the latest award. I'd like to be able to display a list of the awards, as per image.

Abe1 10-10-2004 03:29 PM

Quote:

Originally Posted by Lionel
It would be nice to be able to run a query to select all awarded posts and display them on a page as "Editor's Pick". Does anyone know how to run such a query?

I would like that same thing also. I am working on it. I think I have it all figured out already. Were do you think I should make a link for such an action?

Abe1 10-10-2004 03:30 PM

Quote:

Originally Posted by Lionel
surely someone can help me with that simple add-on. I started but it is pulling only the latest award. I'd like to be able to display a list of the awards, as per image.

The search would look like regular search results.

theArchitect 10-10-2004 11:42 PM

Quote:

Originally Posted by Abe1
I would like that same thing also. I am working on it. I think I have it all figured out already. Were do you think I should make a link for such an action?

If you mean what I think you mean, I would just create a link under search just below Advanced Search. Admins can then move the vB option to somewhere else on their navbar if they don?t like it there.

Abe1 10-12-2004 12:27 PM

Version 1.1 Released. Get it in the first post.

Lionel 10-12-2004 12:49 PM

Quote:

Originally Posted by theArchitect
If you mean what I think you mean, I would just create a link under search just below Advanced Search. Admins can then move the vB option to somewhere else on their navbar if they don?t like it there.

this is nice... Can you make it

A-pull showpost.php instead to display that individual post?

B-Make it display the post title if any instead of the thread thread title.

I will definitely use yours, but look at what I managed to come up with (can't explain how)

edit... never mind... it does... thanks.

Lionel 10-12-2004 01:00 PM

I love it... If I wanted to customize that search template, I should copy the search template into a new template searchawards and alter that one right?

Then I would change the line

eval(print_standard_redirect('search'));

tio reflect the new template. Correct?

Lionel 10-12-2004 01:25 PM

I'll be happy just to customize that line as per image

Abe1 10-12-2004 04:31 PM

Quote:

Originally Posted by Lionel
I'll be happy just to customize that line as per image

I noticed that also. I didn't look much into it. I'm going to look into it what I have time. I'd love to get the award pic there.

teksigns 10-12-2004 04:58 PM

I would like to be able to leave a award note with each one that i give
and have it appear under the award in the post .....

is this Possible ?

Lionel 10-12-2004 05:00 PM

Quote:

Originally Posted by Abe1
I noticed that also. I didn't look much into it. I'm going to look into it what I have time. I'd love to get the award pic there.

wonder if that could be done with preg_replace?

Abe1 10-12-2004 09:08 PM

Quote:

Originally Posted by teksigns
I would like to be able to leave a award note with each one that i give
and have it appear under the award in the post .....


is this Possible ?

I'm sure it is. I'll see what I can do.

Abe1 10-12-2004 09:08 PM

Quote:

Originally Posted by Lionel
wonder if that could be done with preg_replace?

I'll look into it.

theArchitect 10-13-2004 02:16 AM

*theArchitect clicks install*.

Great hack. It will really help our less regular users to make the most of their forum viewing time.

theArchitect 10-13-2004 02:37 AM

Is there anything that should stop one from giving other user groups the power to give awards. I tried to alter the conditionals but must either being doing something wrong or am missing something. Here is the recoded if statement I am using:
Code:

<if condition="$bbuserinfo[usergroupid]=='5' OR $bbuserinfo[usergroupid]=='6' OR $bbuserinfo[usergroupid]=='7'">
                  <if condition="$post[award]=='0'">&nbsp;
                <a href="award.php?$session[sessionurl]do=award&postid=$post[postid]">Add Award</a>
                <else />&nbsp;<a href="award.php?$session[sessionurl]do=award_remove&postid=$post[postid]">Remove Award</a>
                  </if>
                  </if>


Abe1 10-13-2004 12:22 PM

Quote:

Originally Posted by theArchitect
Is there anything that should stop one from giving other user groups the power to give awards. I tried to alter the conditionals but must either being doing something wrong or am missing something. Here is the recoded if statement I am using:
Code:

<if condition="$bbuserinfo[usergroupid]=='5' OR $bbuserinfo[usergroupid]=='6' OR $bbuserinfo[usergroupid]=='7'">
                  <if condition="$post[award]=='0'">&nbsp;
                <a href="award.php?$session[sessionurl]do=award&postid=$post[postid]">Add Award</a>
                <else />&nbsp;<a href="award.php?$session[sessionurl]do=award_remove&postid=$post[postid]">Remove Award</a>
                  </if>
                  </if>


In the php I stop anyone who isn't a moderator of that forum form giving an award.

Lionel 10-13-2004 12:34 PM

In postbit this is how I handled it:

<if condition="$bbuserinfo[usergroupid]=='6'">
<if condition="$post[award]=='0'">&nbsp;
<a href="award.php?$session[sessionurl]do=award&postid=$post[postid]">Select for Editor's Pick</a>
<else />&nbsp;<a href="award.php?$session[sessionurl]do=award_remove&postid=$post[postid]">Remove Editor's Pick</a>
</if>
</if>

just like you, but for one group and that works

try putting $condition= in front of the other groups

Lionel 10-13-2004 02:14 PM

Quote:

Originally Posted by Lionel
wonder if that could be done with preg_replace?

in search.php

find:

$displayUsers = implode(" $vbphrase[or] ", $display['users']);

under it put:

$award="mytest"; //or whatever just to create the condition

then in search_results template, after:

<phrase 1="$searchtime">$vbphrase[search_took_x_seconds]</phrase>
</span>


put in

<if condition="$award"><img src="images/misc/rosette.gif"> <else />

and before the close of the </td>

you close the condition

</if>

you can put whatever you want next to image

Lionel 10-13-2004 02:31 PM

looks much better if you place the conditional as a <tr>......</else> right at the start of the table

Abe1 10-13-2004 03:04 PM

Thanks Lionel. Will do as soon as I have time.

yinyang 10-14-2004 07:34 PM

Quote:

Originally Posted by Abe1
In the changes I said to make in the postbits,
Find:
PHP Code:

$bbuserinfo['usergroupid'] == '6' 

Replace with:
PHP Code:

$bbuserinfo['usergroupid'] == '6' OR $bbuserinfo['usergroupid'] == '7' 


i wanted to let only admins, mods and supermods give awards so i did this:

PHP Code:

<if condition="$bbuserinfo[usergroupid]=='6' OR $bbuserinfo[usergroupid]=='7' OR $bbuserinfo[usergroupid]=='5'"

but it won't let them add awards. says "user has no permission" page when they click on add award.

they can see the "add award", they just can't perform the function because they don't have permission.

suggestions?

Lionel 10-14-2004 08:26 PM

try it with OR condition= instead of OR $bbuser...

Abe1 10-14-2004 08:31 PM

Quote:

Originally Posted by yinyang
i wanted to let only admins, mods and supermods give awards so i did this:

PHP Code:

<if condition="$bbuserinfo[usergroupid]=='6' OR $bbuserinfo[usergroupid]=='7' OR $bbuserinfo[usergroupid]=='5'"

but it won't let them add awards. says "user has no permission" page when they click on add award.

they can see the "add award", they just can't perform the function because they don't have permission.

suggestions?

They can see it, but they can't use it if it's not thier forum.

yinyang 10-15-2004 09:36 AM

Quote:

Originally Posted by Abe1
They can see it, but they can't use it if it's not thier forum.

what do you mean by "their" forum. also, is there a way to make it so they could use it?

Abe1 10-15-2004 11:57 AM

Quote:

Originally Posted by yinyang
what do you mean by "their" forum. also, is there a way to make it so they could use it?

The forums they moderate.

Lionel 10-16-2004 12:16 PM

To replace the navbits, that displays 'Search Results', in search.php I added the bold between:

// add to the navbits
$navbits[''] = $vbphrase['search_results'];
if ($award !=""){
$navbits[''] = 'Editor\'s Pick';
}

$templatename = 'search_results';


Replace Editor's Pick with whatever you want


Quote:

Originally Posted by Lionel
in search.php

find:

$displayUsers = implode(" $vbphrase[or] ", $display['users']);

under it put:

$award="mytest"; //or whatever just to create the condition

then in search_results template, after:

<phrase 1="$searchtime">$vbphrase[search_took_x_seconds]</phrase>
</span>


put in

<if condition="$award"><img src="images/misc/rosette.gif"> <else />

and before the close of the </td>

you close the condition

</if>

you can put whatever you want next to image


HarryBO 10-20-2004 08:47 AM

I have the same Problem as yinyang! I tried all Examples here but no one works. Moderators can the the "ADD AWARD" Button, but they have no Permission to add one!

Ist vll. jemand deutschsprachiges hier, der es hinbekommen hat das Moderatoren Awards vergeben können?

Abe1 10-20-2004 05:42 PM

Quote:

Originally Posted by HarryBO
I have the same Problem as yinyang! I tried all Examples here but no one works. Moderators can the the "ADD AWARD" Button, but they have no Permission to add one!

Ist vll. jemand deutschsprachiges hier, der es hinbekommen hat das Moderatoren Awards vergeben k?nnen?

I'll look into it when I have a chance.


All times are GMT. The time now is 05:05 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.01393 seconds
  • Memory Usage 1,846KB
  • 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
  • (6)bbcode_php_printable
  • (21)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete