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 01-03-2003, 07:40 PM
Kars10's Avatar
Kars10 Kars10 is offline
 
Join Date: Jun 2002
Location: Germany/Franken
Posts: 748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Custom Cursor on / off

Hi !!
Is there a way to set a (or more) custom-cursor(s) in my forums and my members can switch the cursor(s) on or off in there options??

Currently i using in headinclude something like:

CURSOR: url('cursor.cur');

Can anyone help?
Reply With Quote
  #2  
Old 01-03-2003, 07:42 PM
Logik's Avatar
Logik Logik is offline
 
Join Date: Nov 2002
Location: Tx
Posts: 432
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In my opinon. That would bulk up the forums.. But that is not what you think maybe.
Reply With Quote
  #3  
Old 01-04-2003, 01:34 PM
Graphics's Avatar
Graphics Graphics is offline
 
Join Date: Mar 2002
Posts: 157
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I can't do this myself but I know that it will be quite hard to set up. At least I think... You'll need to use Javascript... *Shudders*
Reply With Quote
  #4  
Old 01-04-2003, 01:55 PM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Why would it be hard?

Im sure you could just add a field to the user table, something like:

[sql]ALTER TABLE user ADD customcursor smallint(6) DEFAULT '0' NOT NULL[/sql]

Then just edit member.php and set the queries to update the user etc, then edit the modifyoptions template, and add a radio button section with "Use custom cursor?", and then "yes" and "no" options...

Then just edit global.php, and do a check on the user to see if they use the custom cursor, something like:

Code:
if ($bbuserinfo[customcursor]==1) {
$cursorcode = "the cursor code";
}else{
$cursorcode = "";
}
Then jsut add $cursorcode to the headinclude template...

Im sure it can be done that way

Satan
Reply With Quote
  #5  
Old 01-04-2003, 02:05 PM
Kars10's Avatar
Kars10 Kars10 is offline
 
Join Date: Jun 2002
Location: Germany/Franken
Posts: 748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Cool thank you Chris!!
Can you code something for me/us?
Would be very cool!!
Reply With Quote
  #6  
Old 01-04-2003, 04:56 PM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I could try



Satan
Reply With Quote
  #7  
Old 01-04-2003, 06:10 PM
Kars10's Avatar
Kars10 Kars10 is offline
 
Join Date: Jun 2002
Location: Germany/Franken
Posts: 748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Cool!! Thanks chris!!
Reply With Quote
  #8  
Old 01-04-2003, 08:48 PM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Heh...I had coded it earlier, but our stupid internet cutoff:bored:

Here you go!

Run this sql query:
[sql]ALTER TABLE user ADD customcursor smallint(6) DEFAULT '0' NOT NULL[/sql]

Open forum/member.php
Find:
Code:
  if ($bbuserinfo[emailnotification]) {
    $emailnotificationchecked="checked";
    $emailnotificationnotchecked="";
  } else {
    $emailnotificationchecked="";
    $emailnotificationnotchecked="checked";
  }
add below:
Code:
  if ($bbuserinfo[customcursor]) {
    $customcursorchecked="checked";
    $customcursornotchecked="";
  } else {
    $customcursorchecked="";
    $customcursornotchecked="checked";
  }
Find:
Code:
  $emailnotification=iif($emailnotification=="yes",1,0);
add below:
Code:
  $customcursor=iif($customcursor=="yes",1,0);
Find: (unhacked vB)
Code:
  $DB_site->query("UPDATE user
                   SET ".$updatestyles."adminemail='$adminemail',
                      showemail='$showemail',invisible='$invisible',cookieuser='$cookieuser',
                      maxposts='".addslashes($umaxposts)."',daysprune='".addslashes($prunedays)."',
                      timezoneoffset='".addslashes($timezoneoffset)."',emailnotification='$emailnotification',
                      startofweek='".addslashes($startofweek)."',options='$options',receivepm='$receivepm',
                      emailonpm='$emailonpm',pmpopup='$pmpopup',usergroupid='$bbuserinfo[usergroupid]',
                      nosessionhash='$nosessionhash'
                   WHERE userid='$bbuserinfo[userid]'");
Replace with:
Code:
  $DB_site->query("UPDATE user
                   SET ".$updatestyles."adminemail='$adminemail',
                      showemail='$showemail',invisible='$invisible',cookieuser='$cookieuser',
                      maxposts='".addslashes($umaxposts)."',daysprune='".addslashes($prunedays)."',
                      timezoneoffset='".addslashes($timezoneoffset)."',emailnotification='$emailnotification',customcursor='$customcursor',
                      startofweek='".addslashes($startofweek)."',options='$options',receivepm='$receivepm',
                      emailonpm='$emailonpm',pmpopup='$pmpopup',usergroupid='$bbuserinfo[usergroupid]',
                      nosessionhash='$nosessionhash'
                   WHERE userid='$bbuserinfo[userid]'");
Edit the "modifyoptions" template
Find:
Code:
<tr>
	<td bgcolor="{secondaltcolor}"><normalfont><b>Use 'Email Notification' by default?</b></normalfont><br>
	<smallfont>Using this option emails you whenever someone replies to a thread that you have participated in.</smallfont></td>
	<td bgcolor="{secondaltcolor}"><normalfont>
		<input type="radio" name="emailnotification" value="yes" $emailnotificationchecked> yes
		<input type="radio" name="emailnotification" value="no" $emailnotificationnotchecked> no
	</normalfont></td>
</tr>
add below:
Code:
<tr>
	<td bgcolor="{secondaltcolor}"><normalfont><b>Use Custom Cursor?</b></normalfont><br>
	<smallfont>Using this option sets your Cursor to the Custom Cursor set by the Administrator.</smallfont></td>
	<td bgcolor="{secondaltcolor}"><normalfont>
		<input type="radio" name="customcursor" value="yes" $customcursorchecked> yes
		<input type="radio" name="customcursor" value="no" $customcursornotchecked> no
	</normalfont></td>
</tr>
Open forum/global.php
Find:
Code:
// ###################### Referrer Stuff #########################

// Referer stuff
if ($bbuserinfo['userid']==0 and $usereferrer and !$bbreferrerid and $referrerid) {
  if ($r_id = $DB_site->query_first("SELECT userid FROM user WHERE userid = '".addslashes($referrerid)."'")) {
    vbsetcookie("bbreferrerid",$r_id[userid]);
  }
}
add below:
Code:
if ($bbuserinfo[customcursor]==1) {
$cursorcode = "the cursor code";
}else{
$cursorcode = "";
}
Now open the headinclude template and add $cursorcode where you want...



Satan
Reply With Quote
  #9  
Old 01-05-2003, 07:18 AM
Kars10's Avatar
Kars10 Kars10 is offline
 
Join Date: Jun 2002
Location: Germany/Franken
Posts: 748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This saves my life!!!
Thank you so much Chris!!!

Btw: ...this could be ready to put in Full Releases!
Reply With Quote
  #10  
Old 01-05-2003, 07:22 AM
Kars10's Avatar
Kars10 Kars10 is offline
 
Join Date: Jun 2002
Location: Germany/Franken
Posts: 748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here, i put it in a Txt-File...
Attached Files
File Type: txt custom-cursor.txt (3.9 KB, 9 views)
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 07:52 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.05678 seconds
  • Memory Usage 2,284KB
  • Queries Executed 12 (?)
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
  • (11)bbcode_code
  • (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
  • (1)postbit_attachment
  • (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
  • postbit_attachment
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete