Jump to content

[HQ] Ban From Topic


InvisionHQ

Recommended Posts


When you're doing it could you enable the js console (in firefox it's a F12 key) and check the possible js errors?




I do not have firefox right now had a virus or something that only affected it so I removed it and am using chrome while I make sure everything else is good in my system.

Through chrome the only java script errors I see are


from frame with URL . Domains, protocols and ports must match.
from frame with URL . Domains, protocols and ports must match.
Unsafe JavaScript attempt to access frame with URL http://www.partisandivide.info/index.php?/topic/10409-is-president-obama-overqualified-for-his-job/page__st__40http://googleads.g.doubleclick.net/pagead/ads?client=ca-pub-3109339169763120&output=html&h=90&slotname=9502130578&w=728&lmt=1324327693&flash=11.1.102&url=http%3A%2F%2Fwww.partisandivide.info%2Findex.php%3F%2Ftopic%2F10409-is-president-obama-overqualified-for-his-job%2Fpage__st__40&dt=1324309693608&bpp=14&shv=r20111207&jsv=r20110914&correlator=1324309693894&frm=20&adk=1961577456&ga_vid=709123872.1321637976&ga_sid=1324308957&ga_hid=1310654313&ga_fc=1&u_tz=-300&u_his=29&u_java=1&u_h=900&u_w=1440&u_ah=870&u_aw=1440&u_cd=32&u_nplug=20&u_nmime=60&dff=helvetica&dfs=13&adx=29&ady=9203&biw=1423&bih=785&ref=http%3A%2F%2Fwww.partisandivide.info%2Findex.php%3F%2Fforum%2F36-general-political%2F&fu=0&ifi=1&dtd=628&xpc=G2OucOkMO5&p=http%3A//www.partisandivide.info
Link to comment
Share on other sites

  • 2 months later...
  • Replies 206
  • Created
  • Last Reply

Hi

Im trying to install this however it is causing a database driver error when trying to import the hook file, all topics then become un-viewable. Once the hook is un-installed or disabled the forum comes back online again. Using IPS version 3.2.2

Possibly in relation to this;

http://community.invisionpower.com/tracker/issue-34252-hook-import-issue/

Any help would be superb on how to get this working.

Thanks

Link to comment
Share on other sites

There are a few hooks that trigger it, although I'd have to hunt around to find another one (one of Marcher's does it I do recall) I was able to turn off strict mode though via my.ini... I only have it enabled for QA purposes normally as it only seems to effect a small percentage of servers.

Link to comment
Share on other sites

Hi

I have sorted teh fix to this which ensures it works perfectly,

In the hooks.xml file replace the language files from line 478 to the below


<hookextras_language>

	<language>

	  <word_app>forums</word_app>

	  <word_pack>public_topic</word_pack>

	  <word_key>dp30bant_no_ban_no_ban</word_key>

	  <word_default><![CDATA[You can't unban this member in this topic because he wasn't be banned here.]]></word_default>

   <word_js>0</word_js>

	</language>

	<language>

	  <word_app>forums</word_app>

	  <word_pack>public_topic</word_pack>

	  <word_key>dp30bant_redir_unban</word_key>

	  <word_default><![CDATA[Successfully <strong>unbanned</strong> member from this topic]]></word_default>

   <word_js>0</word_js>

	</language>

	<language>

	  <word_app>forums</word_app>

	  <word_pack>public_topic</word_pack>

	  <word_key>dp30bant_no_ban</word_key>

	  <word_default><![CDATA[You can't ban this member]]></word_default>

   <word_js>0</word_js>

	</language>

	<language>

	  <word_app>forums</word_app>

	  <word_pack>public_topic</word_pack>

	  <word_key>dp30bant_banned_from_this_topic</word_key>

	  <word_default><![CDATA[You're banned from this topic. You can't read it.]]></word_default>

   <word_js>0</word_js>

	</language>

	<language>

	  <word_app>forums</word_app>

	  <word_pack>public_topic</word_pack>

	  <word_key>dp30bant_wrong_topic</word_key>

	  <word_default>Wrong topic ID. Please try again.</word_default>

   <word_js>0</word_js>

	</language>

	<language>

	  <word_app>forums</word_app>

	  <word_pack>public_topic</word_pack>

	  <word_key>dp30bant_redir_ban</word_key>

	  <word_default><![CDATA[Successfully <strong>banned</strong> member from this topic]]></word_default>

   <word_js>0</word_js>

	</language>

	<language>

	  <word_app>forums</word_app>

	  <word_pack>public_topic</word_pack>

	  <word_key>dp30bant_already_banned</word_key>

	  <word_default>This member is already banned in this topic</word_default>

   <word_js>0</word_js>

	</language>

	<language>

	  <word_app>forums</word_app>

	  <word_pack>public_topic</word_pack>

	  <word_key>dp30bant_wrong_member</word_key>

	  <word_default>Wrong member ID. Please try again.</word_default>

   <word_js>0</word_js>

	</language>

	<language>

	  <word_app>forums</word_app>

	  <word_pack>public_topic</word_pack>

	  <word_key>dp30bant_title</word_key>

	  <word_default>Ban Center</word_default>

	<word_js>0</word_js>

	</language>

	<language>

	  <word_app>forums</word_app>

	  <word_pack>public_topic</word_pack>

	  <word_key>dp30bant_title_ban</word_key>

	  <word_default>Ban Member</word_default>

	<word_js>0</word_js>

	</language>

	<language>

	  <word_app>forums</word_app>

	  <word_pack>public_topic</word_pack>

	  <word_key>dp30bant_title_unban</word_key>

	  <word_default>Unban Member</word_default>

	<word_js>0</word_js>

	</language>

	<language>

	  <word_app>forums</word_app>

	  <word_pack>public_topic</word_pack>

	  <word_key>dp30bant_from_this</word_key>

	  <word_default>from this topic</word_default>

	<word_js>0</word_js>

	</language>

	<language>

	  <word_app>forums</word_app>

	  <word_pack>public_topic</word_pack>

	  <word_key>dp30bant_ajax_box_title</word_key>

	  <word_default>Ban Center for Topic</word_default>

	<word_js>0</word_js>

	</language>

	<language>

	  <word_app>forums</word_app>

	  <word_pack>public_topic</word_pack>

	  <word_key>dp30bant_ban_member_enter</word_key>

	  <word_default>Enter Member Name</word_default>

	<word_js>0</word_js>

	</language>

	<language>

	  <word_app>forums</word_app>

	  <word_pack>public_topic</word_pack>

	  <word_key>dp30bant_ban_member</word_key>

	  <word_default>Ban Member</word_default>

	<word_js>0</word_js>

	</language>

  </hookextras_language>

The difference in this code is to add


<word_js>0</word_js>



at the end of each of the <language> tags just prior to each instance of </language>

Hope that helps

Regards

Wayne
UKPoliceOnline

Link to comment
Share on other sites

  • 2 weeks later...
  • 3 weeks later...

RevengeFNF, can't confirm it on a fresh 3.3 install. It must be something specific for your board. I can check it, but you need to give me full access (ACP&FTP) to your board.


Thanks! I also wanted to suggest that since there is a moderation dropdown in 3.3, that you could just remove the ban center button and put this as an option within that dropdown.



I don't think it would be added/changed in the next releases.. ;)
Link to comment
Share on other sites


I don't think it would be added/changed in the next releases.. :wink:




I'm sorry, I don't understand what you mean. In 3.3, there is a "Topic Moderation" button, exactly where this hook places a "Ban center" button. I was just suggesting that instead of having a button "Topic Moderation" and "Ban Center" side by side, you could just make the "Ban Center" link appear inside the "Topic Moderation" drop-down button.

Thanks
Link to comment
Share on other sites

mySQL query error: SELECT banned_members FROM topics WHERE tid = 61
.--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------.
| File | Function | Line No. |
|----------------------------------------------------------------------------+-------------------------------------------------------------------------------+-------------------|
| applications/forums/modules_public/forums/topics.php | [dp3_BanFromTopicFunctions].topicSetUp | 174 |
'----------------------------------------------------------------------------+-------------------------------------------------------------------------------+-------------------'
| hooks/dp3_BanFromTopicFunctions_6ab29d49e319ad688998e874e03c3a6a.php | [public_forums_forums_topics].doExecute | 45 |
'----------------------------------------------------------------------------+-------------------------------------------------------------------------------+-------------------'
| admin/sources/base/ipsController.php | [dp3_BanFromTopicFunctions].doExecute | 306 |
'----------------------------------------------------------------------------+--------------------------------------------

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...