Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 11-15-2001, 08:11 AM
LuBi LuBi is offline
 
Join Date: Oct 2001
Posts: 416
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I don't know who else would know this but if anyone could write up the code like on this page where a report button takes the place of the edit button for everyone except on their own posts where then there is no report button but in it's place an edit button. Whew! anyways I dunno who else would know this but I guess the IP logged link is gone or only available to mods etc etc.. so if anyone could set me in the right direction Thanks!
Reply With Quote
  #2  
Old 11-15-2001, 10:24 AM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In functions.php, I added this:
Code:
		if ($post[userid]==$bbuserinfo[userid] or ($bbuserinfo[usergroupid]=="5" or $bbuserinfo[usergroupid]=="6" or $bbuserinfo[usergroupid]=="7")) {
			eval("\$post[editpost] = \"".gettemplate("postbit_editpost")."\";");
		} else {
			$post[editpost]="";
		}

		if ($post[userid]!=$bbuserinfo[userid]) {
			eval("\$post[report] = \"".gettemplate("postbit_report")."\";");
		} else {
			$post[report]="";
		}
right after this:
Code:
		$post[joindate]=vbdate($registereddateformat,$post[joindate]);
You need to make some changes in the postbit template though.
Replace the edit button with $post[editpost], and create another template "postbit_editpost" that will contain that buttons.
Same thing for the report button, replace it with $post[report] and create a new template "postbit_report".
Reply With Quote
  #3  
Old 11-15-2001, 03:04 PM
LuBi LuBi is offline
 
Join Date: Oct 2001
Posts: 416
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

your the best! but wheres the IP logged link? Or did you remove it completely?

Quote:
replace it with $post[report] and create a new template "postbit_report".
What am I replacing for $post[report]

Also what would one of those templates look like? Or can I just hack something up like (this is my report button)

<a href="report.php?s=$session[sessionhash]&postid=$post[postid]"><img src="{imagesfolder}/report.gif" border="0" alt="Report this post to a moderator"></a> ???

Basically now I have the edit show up all the time and the report show up only on thread that are not mine. How do i get one icon to take the place of another.. in the postbit?

Reply With Quote
  #4  
Old 11-15-2001, 04:02 PM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

My postbit_report template:
Code:
<a href="report.php?s=$session[sessionhash]&postid=$post[postid]"><img src="{imagesfolder}/report.gif" border="0" alt="Report this post to a moderator"></a>
postbit_editpost template:
Code:
	<a href="editpost.php?s=$session[sessionhash]&action=editpost&postid=$post[postid]"><img src="{imagesfolder}/edit.gif" border="0" alt="Edit/Delete Message"></a>
In my postbit I just place this:
Code:
			$post[report]
			$post[editpost]
where I want the button to appear.

BTW, it's coded so mods and admins will always see the edit button, and also the report button.
Only regular members can't see both of them at the same post.

So I would say you're fine...
Reply With Quote
  #5  
Old 11-15-2001, 04:16 PM
LuBi LuBi is offline
 
Join Date: Oct 2001
Posts: 416
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

rofl thanks! you know from dealing with me on these forums I'm nothing better than a script kiddie wit very little skill Thanks Again!

Oh lol you still haven't answered what about the IP logged? Where is that or when does it show up if at all!?
Reply With Quote
  #6  
Old 11-15-2001, 04:22 PM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oh right, sorry.

I *think* I replaced this:
Code:
	// do ip addresses
	if ($post[ip]!="") {
		if ($logip==2) {
			eval("\$post[iplogged] .= \"".gettemplate("postbit_ip_show")."\";");
		}
		if ($logip==1) {
			eval("\$post[iplogged] .= \"".gettemplate("postbit_ip_hidden")."\";");
		}
		if ($logip==0) {
			$post[iplogged]="";
		}
	} else {
		$post[iplogged]="";
	}
with this:
Code:
	// do ip addresses
	if ($bbuserinfo[usergroupid]=="5" or $bbuserinfo[usergroupid]=="6" or $bbuserinfo[usergroupid]=="7") {
	  if ($post[ip]!="") {
		  if ($logip==2) {
			  eval("\$post[iplogged] .= \"".gettemplate("postbit_ip_show")."\";");
		  }
		  if ($logip==1) {
			  eval("\$post[iplogged] .= \"".gettemplate("postbit_ip_hidden")."\";");
		  }
		  if ($logip==0) {
			  $post[iplogged]="";
		  }
	  } else {
		  $post[iplogged]="";
	  }
	}
Although I'm not sure about the original code.

And yes, it only shows up for mods/admins.
Reply With Quote
  #7  
Old 11-15-2001, 04:31 PM
LuBi LuBi is offline
 
Join Date: Oct 2001
Posts: 416
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks so much as usual! Everything worked great site looks clean, my real members love it!

everyone's gotta start somewhere, un-luckly for me I have only one direct compeditor with a solid foundation. So I fugure I'll have more than just a forum plus have a better faster more reliable feature packed forum to make it an easy transition for all his members. Everytime I get help on a hack or something from here I get closer to my goal! Now you know when I say thanks I really mean it
Reply With Quote
  #8  
Old 01-09-2002, 12:18 PM
Lesane's Avatar
Lesane Lesane is offline
 
Join Date: Oct 2001
Location: The Netherlands
Posts: 1,149
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just added it to my forum. Thanks FlyFire
Reply With Quote
  #9  
Old 02-07-2002, 05:34 PM
voogru's Avatar
voogru voogru is offline
 
Join Date: Dec 2001
Location: Miami, FL
Posts: 104
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

works like a charm

thanks
Reply With Quote
  #10  
Old 02-16-2002, 06:11 PM
tanster's Avatar
tanster tanster is offline
 
Join Date: Feb 2002
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Worked beautifully.

Thank you!
Jennie
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:36 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04179 seconds
  • Memory Usage 2,259KB
  • Queries Executed 11 (?)
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
  • (7)bbcode_code
  • (1)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