Post Notifier

Started by live627, February 09, 2014, 08:25:22 PM

Previous topic - Next topic

bros

I'm still having the issue I messaged you about after paying for this mod - it doesn't work on my big board - when looking at the network tab of inspect element of Chrome, it shows a space before the XML code starts.

samborabora

This works perfectly on the default theme but doesn't work at all on my custom theme. What should I check in general that might cause this mod to not display properly?

samborabora

I've checked both default and my custom theme in chrome developer tools, and the whole postnotifier script doesn't appear to be working, whereas it refreshes perfectly on the default theme. Is there a way I can check the script is being called?

samborabora

I'm getting this error, if it helps:

Uncaught TypeError: Cannot set property 'innerHTML' of nullscript.js?fin20:479 setInnerHTMLscript.js?fin20:1017 JumpTo.showSelectscript.js?fin20:1008 JumpToindex.php?topic=198.msg400:1140 (anonymous function)

I don't get this with default theme and I assume this is causing the trouble?

live627

Your theme is  messed.

Quote from: samborabora on February 05, 2015, 07:55:30 AM
Is there a way I can check the script is being called?
./Themes/defautl/scripts/postnotifier.js

Biology Forums

I like this though I'm concerned about the load. Will try to convert it to work on 1.x.

live627


samborabora

Quote from: live627 on February 06, 2015, 01:07:05 AM
Your theme is  messed.
Yup!

Quote from: live627 on February 06, 2015, 01:07:05 AM
Quote from: samborabora on February 05, 2015, 07:55:30 AM
Is there a way I can check the script is being called?
./Themes/defautl/scripts/postnotifier.js
So, how can I see it's being loaded or not? What would the default theme call upon that a messed theme would cause it to not load?

samborabora

Is there a way of moving the position where the ribbon appears? Since the ribbon is only fixed to the top via css, how can I put the actual <div> somewhere else on the Display page (like above the submit button of the quick reply)?

mnn2

After installing this mod, the visual verification image (anti-spam) no longer works. Please see following screen shot in attached file.

samborabora

Quote from: samborabora on June 01, 2015, 02:20:26 PM
Is there a way of moving the position where the ribbon appears? Since the ribbon is only fixed to the top via css, how can I put the actual <div> somewhere else on the Display page (like above the submit button of the quick reply)?

Again, how do I put it somewhere else in the page?

samborabora

Any ideas how to adjust it so the notification is just above the quick reply on the topic page?

samborabora

So, let's say below: <a id="lastPost"></a> and <div class="pagesection"> I want it to generate: <div id="newmsg" style="display: block;">
<a href="/forum/index.php?msg=223609913"><span>X</span> new replies</a>
</div>
how exactly would I get it to appear there? I can find the hook alright: echo '
<script type="text/javascript">
var iLastMsg = ' . $context['topic_last_message'] . ';
</script>
<div id="topbar">
</div>';
but where do I define WHERE this hooks into?

villasg

Hi .
In my smf 2.0.10 with SimplePortal 2.3.6 have error in edit index.php .

My index.php have:

// Do some logging, unless this is an attachment, avatar, toggle of editor buttons, theme option, XML feed etc.
if (empty($_REQUEST['action']) || !($_REQUEST['action'] == 'portal' && isset($_GET['xml'])) && !in_array($_REQUEST['action'], array('dlattach', 'findmember', 'jseditor', 'jsoption', 'requestmembers', 'smstats', '.xml', 'xmlhttp', 'verificationcode', 'viewquery', 'viewsmfile')))



I ask if its safe to make edit in install.xml like :

<?xml version="1.0"?>
<!DOCTYPE modification SYSTEM "http://www.simplemachines.org/xml/modification">
<modification xmlns="http://www.simplemachines.org/xml/modification" xmlns:smf="http://www.simplemachines.org/">
<id>live6627:post_notifier</id>

<file name="$boarddir/index.php">
<operation>
<search position="before"><![CDATA[if (empty($_REQUEST['action']) || !($_REQUEST['action'] == 'portal' && isset($_GET['xml'])) && !in_array($_REQUEST['action'], array(]]></search>
<add><![CDATA['postnotifier', ]]></add>
</operation>
</file>

</modification>


live627

Quote
I ask if its safe to make edit in install.xml like :
oh yes

live627

Quotebut where do I define WHERE this hooks into?
I'm confused here....

Couldn't you move that code into your display file?

samborabora

Quote from: live627 on July 17, 2015, 09:16:43 PM
Quotebut where do I define WHERE this hooks into?
I'm confused here....

Couldn't you move that code into your display file?
Sorry, I'm not sure how post notifier knows where to put the div layer on the page, I think the javascript places it at the top of the page under the head? How would I move this into my display.template?

live627

Ah, it does  that with a template layer inserted between html and body.

https://github.com/live627/smf-post-notifier/blob/master/PostNotifier.php#L18

samborabora

Quote from: live627 on July 18, 2015, 03:24:03 AM
Ah, it does  that with a template layer inserted between html and body.

https://github.com/live627/smf-post-notifier/blob/master/PostNotifier.php#L18

Ahh, I see that now, so is there a way of inserting it between two html sections? What defines the two insertion points?

live627

You can grab the html from that template at the bottom of the file and move it where you want.

Advertisement: