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 02-11-2010, 09:49 PM
TRa5H's Avatar
TRa5H TRa5H is offline
 
Join Date: Apr 2008
Location: Middletown, PA
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Need Help with ID imput..

Hi all I am seeking help.. I am working on a MOD that is based on this MOD https://vborg.vbsupport.ru/showthrea...ighlight=wibya


now the following is the coding within the XML document attached...


Code:
<?xml version="1.0" encoding="ISO-8859-1"?>

<product productid="skysa_toolbar" active="1">
	<title>Skysa Toolbar</title>
	<description />
	<version>1.0</version>
	<url />
	<versioncheckurl />
	<apm_releasedate>0</apm_releasedate>
	<apm_author />
	<apm_relatedurl />
	<apm_extrainfo />
	<apm_extraedit />
	<dependencies>
	</dependencies>
	<codes>
	</codes>
	<templates>
		<template name="skysa_javascript" templatetype="template" date="1254860954" username="TRa5H" version=""><![CDATA[<script src='http://static2.skysa.com?i=$vboptions[skysa_toolbar_id]' type='text/javascript'></script>]]></template>
	</templates>
	<plugins>
		<plugin active="1" executionorder="5">
			<title>Cache Templates</title>
			<hookname>cache_templates</hookname>
			<phpcode><![CDATA[$globaltemplates = array_merge($globaltemplates, array('skysa_javascript'));]]></phpcode>
		</plugin>
		<plugin active="1" executionorder="5">
			<title>Global Start</title>
			<hookname>global_start</hookname>
			<phpcode><![CDATA[eval('$skysa_toolbar = "' . fetch_template('skysa_javascript') . '";');]]></phpcode>
		</plugin>
		<plugin active="1" executionorder="5">
			<title>Parse Templates</title>
			<hookname>parse_templates</hookname>
			<phpcode><![CDATA[$vbulletin->templatecache['footer'] = str_replace('$ad_location[ad_footer_end]', '$skysa_toolbar $ad_location[ad_footer_end]', $vbulletin->templatecache['footer']);]]></phpcode>
		</plugin>
	</plugins>
	<phrases>
		<phrasetype name="vBulletin Settings" fieldname="vbsettings">
			<phrase name="setting_skysa_toolbar_id_desc" date="1254859124" username="TRa5H" version="1.0" />
			<phrase name="setting_skysa_toolbar_id_title" date="1254859124" username="TRa5H" version="1.0"><![CDATA[Toolbar ID]]></phrase>
			<phrase name="settinggroup_skysa_group" date="1254858566" username="TRa5H" version="1.0"><![CDATA[Skysa Settings]]></phrase>
		</phrasetype>
	</phrases>
	<options>
		<settinggroup name="skysa_group" displayorder="655356">
			<setting varname="skysa_toolbar_id" displayorder="20">
				<datatype>number</datatype>
			</setting>
		</settinggroup>
	</options>
	<helptopics>
	</helptopics>
	<cronentries>
	</cronentries>
	<faqentries>
	</faqentries>
	<templateedits>
	</templateedits>
</product>
Everything seems to be working except when I imput the following code ID serial into the ID box within the Skysa Toolbar options under the Vbulletin Options. It resets to "98" and the bar will not register..

here is a live demo of my site working with the bar but I would like to actually set it up as an Application rather than Imput the informaion manually.

http://www.weltmuzik.com/forum/index.php



the ID code I want to imput into the ID box is :

98F375C1-1DBC-46A8-AAFC-A96FC8A8EA96



Here is a screenshot of the imput box:






SO I am just seeing if anyone knows why the error would be happening when I enter the code since it works fine with the www.wibya.com ID of 5 digits.. but now that I edited to the variations for SKYSA is does this?

Thanks ahead of time
Attached Files
File Type: xml product-skysa_toolbar.xml (2.2 KB, 2 views)
Reply With Quote
  #2  
Old 02-11-2010, 10:06 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I don't know a lot about that, but I think your problem is probably this line:

Code:
<datatype>number</datatype>
I guess it probably stops when it gets to the first thing that's not a number. Maybe try changing it to:

Code:
<datatype>free</datatype>

ETA: of course if was set to "number" that probably means the code is expecting a number, so hopefully you've handled that...
Reply With Quote
  #3  
Old 02-11-2010, 10:24 PM
TRa5H's Avatar
TRa5H TRa5H is offline
 
Join Date: Apr 2008
Location: Middletown, PA
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Bingo!

Thank you works like a charm.. I am glad too I was overlooking the integer all the time..

Thanks again!

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

Have another question if I wanted to add this code here into the product:

Code:
<script type="text/javascript">
var _SKYAUTH = {
loginUrl:'http://www.weltmuzik.com/forum/login.php?u=$bbuserinfo[userid]',
memberNick:'$bbuserinfo[username]',
memberId:'$bbuserinfo[userid]',
profileUrl:'http://www.weltmuzik.com/forum/member.php?u=$bbuserinfo[userid]',
photoUrl:'http://www.weltmuzik.com/forum/image.php?u=$bbuserinfo[userid]'
};
</script>

I would want to add it to this section am I correct?:

Code:
<phpcode><![CDATA[$vbulletin->templatecache['footer'] = str_replace('$ad_location[ad_footer_end]', '$skysa_toolbar $ad_location[ad_footer_end]', $vbulletin->templatecache['footer']);]]></phpcode>
I think that is the place for it.. lol i am still new to this as well.
Reply With Quote
  #4  
Old 02-11-2010, 10:39 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, you can add it to the plugin where it will be used, or some plugin.

By the way, I should probably save someone else the trouble of posting and say that I don't think you are really meant to edit those files, I think you are really supposed to set up everything using the admin control panel and then export the product (but I've edited my xml file myself, sometimes it's just easier).
Reply With Quote
  #5  
Old 02-11-2010, 10:49 PM
TRa5H's Avatar
TRa5H TRa5H is offline
 
Join Date: Apr 2008
Location: Middletown, PA
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yeah I am just having trouble trying to figure out how to implement it .. it belongs right below the other code in the [footer] section and well i dont know Java ..

I am just a reader lol.. i read what I see , test it and then if I have problems ask for help..

more of a designer than a coder.. i can make a site look outstanding once i get around the coding ha!

so any help on where, how and what code string would be very helpful.. once its done I will reupload this to the public so they all can use the Product like Namaless did with the original Wibya XML
Reply With Quote
  #6  
Old 02-11-2010, 11:25 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm sorry, I wasn't paying enough attention - like you said, the JavaScript needs to go in a template and that part you posted adds to the footer.

Try this:

Code:
		<phpcode><![CDATA[$js = "<script type=\"text/javascript\">
var _SKYAUTH = {
loginUrl:'http://www.weltmuzik.com/forum/login.php?u={$vbulletin->userinfo[userid]}',
memberNick:'{$vbulletin->userinfo[username]}',
memberId:'{$vbulletin->userinfo[userid]}',
profileUrl:'http://www.weltmuzik.com/forum/member.php?u={$vbulletin->userinfo[userid]}',
photoUrl:'http://www.weltmuzik.com/forum/image.php?u={$vbulletin->userinfo[userid]}'
};</script>";

$vbulletin->templatecache['footer'] = str_replace('$ad_location[ad_footer_end]', '$skysa_toolbar $js $ad_location[ad_footer_end]', $vbulletin->templatecache['footer']);]]></phpcode>
Reply With Quote
  #7  
Old 02-12-2010, 02:11 AM
TRa5H's Avatar
TRa5H TRa5H is offline
 
Join Date: Apr 2008
Location: Middletown, PA
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks again worked like a charm.

Ill reference your help in my comments thanks!



Lol now I am trying to add something else to stop unregistered users from being logged in and messaging people through the messenger to other people.

here is what I have but it is not working lol..

I am so new to this...


If you understand what I am doing wrong this is the last part I am having trouble.. so that way I can update the product later.

Code:
plugin active="1" executionorder="5" product="vbulletin">
		<title>Disable Unregistered Access</title>
		<hookname>disable_var _SKYAUTH </hookname>
		<phpcode><![CDATA[if (in_array($vbulletin->userinfo['usergroupid'],array(1,3,4,8)))
{
	print_no_permission();
}]]></phpcode>
	</plugin>
Reply With Quote
  #8  
Old 02-12-2010, 07:48 AM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It looks like you added that section and made up a hook name? You need to pick an existing hook name, or else add a new hook. You probably want to pick an existing hook, but I don't know what to tell you because I'm not sure when you want that code to execute.
Reply With Quote
  #9  
Old 02-12-2010, 01:41 PM
TRa5H's Avatar
TRa5H TRa5H is offline
 
Join Date: Apr 2008
Location: Middletown, PA
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am trying to disable Unregistered Users from accessing the Auto Login Feature that the code enables.

Basically they will be able to see the bar but will not be able to access the messenger ..
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 11:22 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.08508 seconds
  • Memory Usage 2,273KB
  • Queries Executed 14 (?)
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)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (1)postbit_attachment
  • (9)postbit_onlinestatus
  • (9)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_postinfo_query
  • fetch_postinfo
  • 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_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete