Guest Registration Notification

Started by live627, June 18, 2010, 10:10:00 PM

Previous topic - Next topic

Clickout

Hi,
looks like i just found a bug in version 1.5

i've installed the mod in my smf 2.0.2 forum and my xml sitemap became invalid in my webmaster tools. when i tried to fetch the xml sitemap as googlebot i found the following outputHTTP/1.1 200 OK
Server: cloudflare-nginx
Date: Tue, 27 Dec 2011 14:15:19 GMT
Content-Type: text/xml; charset=UTF-8
Transfer-Encoding: chunked
Connection: keep-alive
Pragma: no-cache
Cache-Control: private
Expires: Mon, 26 Jul 1997 05:00:00 GMT
Last-Modified: Tue, 27 Dec 2011 14:15:19 GMT
Vary: Accept-Encoding,User-Agent
Set-Cookie: __cfduid=d740ca9d829a179d4c3b855e3536ded2d1324995318; expires=Mon, 23-Dec-2019 23:50:00 GMT; path=/; domain=.ipool.tk
Set-Cookie: __cfduid=d740ca9d829a179d4c3b855e3536ded2d1324995318; expires=Mon, 23-Dec-2019 23:50:00 GMT; path=/; domain=.www.ipool.tk
Content-Encoding: gzip

<div style="padding: 1em;border: 1px solid #cc3344;color: #000;background-color: #ffe4e9;margin-bottom: 1em;"><img style="float: left; width: 2ex; font-size: 2em; color: red; padding-right: 5px;" src="http://www.ipool.tk/guest.gif" title="" /><h3 style="padding: 0;margin: 0;font-size: 1.3em;text-decoration: none;">Join the friendliest worldwide Electronics Discussion Community!</h3><p style="margin: 1em 0 0 0;">Members <a href="http://www.ipool.tk/login/" class="bbc_link"><strong>Login</strong></a> &nbsp;| &nbsp;Not an iPooL member yet? &nbsp;<a href="http://www.ipool.tk/register/" class="bbc_link"><strong>Register Now!</strong></a><br />iPooL is the perfect Community forum for Electronics & Communication Engineering Discussions and Support &nbsp;<a href="http://www.ipool.tk/about/" class="bbc_link">Learn More...</a></p></div><?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
<url>
<loc>http://www.ipool.tk/index.php</loc>
<lastmod>2011-12-27T09:15:19-05:00</lastmod>
<changefreq>always</changefreq>
<priority>1.0</priority>
</url>
<url>
<loc>http://www.ipool.tk/general-chat/</loc>
<lastmod>2011-12-27T08:47:49-05:00</lastmod> ....

The rest of the code is just fine..

it's like the mod is trying to display the guest registration notification in my xml sitemap :(

is there any solution for this problem..

I'm using the overview light theme by ds.


thank you..

ascaland

Thanks for pointing out the bug! Seems I may have forgotten to take into account AJAX calls and such, so I have modified the mod.

Version 1.5.1 is now out.

Clickout

#162
no problem.. :) Thanks for the new version. I've installed 1.5.1 and my xml sitemap is valid now..

sharks

Thanks for updating your mod, Project Evolution. :) These days, few devs care about their mods on SMF.

ascaland


jstop

Just installed the mod, Had to do it manually. I can't get the text to show in the tab or the form...
What did I miss?
What files should I attach?
Website admin for
-------------------------------------------------
http://bridgestonemotorcycleparts.com
http://www.6x6talk.com

ascaland

Quote from: jstop on February 06, 2012, 12:32:16 PM
Just installed the mod, Had to do it manually. I can't get the text to show in the tab or the form...
What did I miss?
What files should I attach?

Looks like it is missing the language strings. Did you follow the instructions in english.xml?

jstop

Quote from: Project Evolution on February 06, 2012, 05:00:17 PM
Quote from: jstop on February 06, 2012, 12:32:16 PM
Just installed the mod, Had to do it manually. I can't get the text to show in the tab or the form...
What did I miss?
What files should I attach?

Looks like it is missing the language strings. Did you follow the instructions in english.xml?

No... Where are those instructions?
Website admin for
-------------------------------------------------
http://bridgestonemotorcycleparts.com
http://www.6x6talk.com

ascaland

Quote from: jstop on February 06, 2012, 05:04:16 PM
Quote from: Project Evolution on February 06, 2012, 05:00:17 PM
Quote from: jstop on February 06, 2012, 12:32:16 PM
Just installed the mod, Had to do it manually. I can't get the text to show in the tab or the form...
What did I miss?
What files should I attach?

Looks like it is missing the language strings. Did you follow the instructions in english.xml?

No... Where are those instructions?

Contained within the modification. It also gives the instructions when you parse the mod from the mod site.

jstop

Quote from: Project Evolution on February 06, 2012, 05:24:13 PM
Quote from: jstop on February 06, 2012, 05:04:16 PM
Quote from: Project Evolution on February 06, 2012, 05:00:17 PM
Quote from: jstop on February 06, 2012, 12:32:16 PM
Just installed the mod, Had to do it manually. I can't get the text to show in the tab or the form...
What did I miss?
What files should I attach?

Looks like it is missing the language strings. Did you follow the instructions in english.xml?

No... Where are those instructions?

Contained within the modification. It also gives the instructions when you parse the mod from the mod site.

I modified the following pages:

Sources/ModSettings.php
Themes/default/BoardIndex.template.php
Themes/default/Display.template.php
Themes/default/MessageIndex.template.php
Themes/default/languages/Modifications.english.php
Themes/default/languages/Help.english.php

Website admin for
-------------------------------------------------
http://bridgestonemotorcycleparts.com
http://www.6x6talk.com

jstop

Got the text issue working!

Next Question is there a way to get the notification to show on my SimplePortal home page?
There are blocks for Custom HTML, Custom PHP if that helps.
Website admin for
-------------------------------------------------
http://bridgestonemotorcycleparts.com
http://www.6x6talk.com

ascaland

Hmmm, I dont believe GRN without some manual work can get that working. Since PHP is an option, you can use the actual code that is used for the top layer (the actual notification) of the mod. This is it below (messy, I know...):
function template_grn_above() {
   
global $modSettings;

$notification = (!empty($modSettings['guest_notify_css'])) ? '<div style="padding: 1em;margin-bottom: 1em;' . $modSettings['guest_notify_css'] . '">' : '<div style="padding: 1em;border: 1px solid #cc3344;color: #000;background-color: #ffe4e9;margin-bottom: 1em;">';
$notification .= (!empty($modSettings['guest_notify_img_path'])) ? '<img style="float: left; width: 2ex; font-size: 2em; color: red; padding-right: 5px;" src="' . $modSettings['guest_notify_img_path'] . '" title="" />' : '<p style="padding: 0;margin: 0;float: left;width: 1em;font-size: 1.5em;color:red;">!!</p>';
$notification .= (!empty($modSettings['guest_notify_css_title'])) ? '<h3 style="padding: 0;margin: 0;' . $modSettings['guest_notify_css_title'] . '">' . $modSettings['guest_notify_title'] . '</h3>' : '<h3 style="padding: 0;margin: 0;font-size: 1.1em;text-decoration: underline;">' . $modSettings['guest_notify_title'] . '</h3>';
$notification .= '<p style="margin: 1em 0 0 0;">' . parse_bbc($modSettings['guest_notify_contents']) . '</p></div>';
echo $notification;
}

jstop

Quote from: Project Evolution on February 06, 2012, 07:24:45 PM
Hmmm, I dont believe GRN without some manual work can get that working. Since PHP is an option, you can use the actual code that is used for the top layer (the actual notification) of the mod. This is it below (messy, I know...):
function template_grn_above() {
   
global $modSettings;

$notification = (!empty($modSettings['guest_notify_css'])) ? '<div style="padding: 1em;margin-bottom: 1em;' . $modSettings['guest_notify_css'] . '">' : '<div style="padding: 1em;border: 1px solid #cc3344;color: #000;background-color: #ffe4e9;margin-bottom: 1em;">';
$notification .= (!empty($modSettings['guest_notify_img_path'])) ? '<img style="float: left; width: 2ex; font-size: 2em; color: red; padding-right: 5px;" src="' . $modSettings['guest_notify_img_path'] . '" title="" />' : '<p style="padding: 0;margin: 0;float: left;width: 1em;font-size: 1.5em;color:red;">!!</p>';
$notification .= (!empty($modSettings['guest_notify_css_title'])) ? '<h3 style="padding: 0;margin: 0;' . $modSettings['guest_notify_css_title'] . '">' . $modSettings['guest_notify_title'] . '</h3>' : '<h3 style="padding: 0;margin: 0;font-size: 1.1em;text-decoration: underline;">' . $modSettings['guest_notify_title'] . '</h3>';
$notification .= '<p style="margin: 1em 0 0 0;">' . parse_bbc($modSettings['guest_notify_contents']) . '</p></div>';
echo $notification;
}


I put the code in an empty "Custom PHP block" in SimplePortal and all I get is an empty block.
Website admin for
-------------------------------------------------
http://bridgestonemotorcycleparts.com
http://www.6x6talk.com

ascaland

Quote from: jstop on February 07, 2012, 09:33:15 PM
Quote from: Project Evolution on February 06, 2012, 07:24:45 PM
Hmmm, I dont believe GRN without some manual work can get that working. Since PHP is an option, you can use the actual code that is used for the top layer (the actual notification) of the mod. This is it below (messy, I know...):
function template_grn_above() {
   
global $modSettings;

$notification = (!empty($modSettings['guest_notify_css'])) ? '<div style="padding: 1em;margin-bottom: 1em;' . $modSettings['guest_notify_css'] . '">' : '<div style="padding: 1em;border: 1px solid #cc3344;color: #000;background-color: #ffe4e9;margin-bottom: 1em;">';
$notification .= (!empty($modSettings['guest_notify_img_path'])) ? '<img style="float: left; width: 2ex; font-size: 2em; color: red; padding-right: 5px;" src="' . $modSettings['guest_notify_img_path'] . '" title="" />' : '<p style="padding: 0;margin: 0;float: left;width: 1em;font-size: 1.5em;color:red;">!!</p>';
$notification .= (!empty($modSettings['guest_notify_css_title'])) ? '<h3 style="padding: 0;margin: 0;' . $modSettings['guest_notify_css_title'] . '">' . $modSettings['guest_notify_title'] . '</h3>' : '<h3 style="padding: 0;margin: 0;font-size: 1.1em;text-decoration: underline;">' . $modSettings['guest_notify_title'] . '</h3>';
$notification .= '<p style="margin: 1em 0 0 0;">' . parse_bbc($modSettings['guest_notify_contents']) . '</p></div>';
echo $notification;
}


I put the code in an empty "Custom PHP block" in SimplePortal and all I get is an empty block.

Well, you might have to actually adjust it. Im assuming having it all in a function isnt necessary.

Tikkuy

I'm not sure if I've installed this correctly! When I tried to I recieved an "The package you are trying to download or install is either corrupt or not compatible with this version of SMF" error, but as I'm getting that with all my installations for some reason I just uploaded the .zip into the Packages directory. It's showing up on the package list but has no option to install or anything, and I'm not sure where to look to see if the thing has been installed as I don't know where the options are in the ACP. Any help?!

Thanks!

ascaland

Quote from: Tikkuy on March 21, 2013, 03:21:22 AM
I'm not sure if I've installed this correctly! When I tried to I recieved an "The package you are trying to download or install is either corrupt or not compatible with this version of SMF" error, but as I'm getting that with all my installations for some reason I just uploaded the .zip into the Packages directory. It's showing up on the package list but has no option to install or anything, and I'm not sure where to look to see if the thing has been installed as I don't know where the options are in the ACP. Any help?!

Thanks!

Use the Package Emulation feature to get this working.

Tikkuy

Quote from: Anthony` on March 21, 2013, 04:47:32 PM
Quote from: Tikkuy on March 21, 2013, 03:21:22 AM
I'm not sure if I've installed this correctly! When I tried to I recieved an "The package you are trying to download or install is either corrupt or not compatible with this version of SMF" error, but as I'm getting that with all my installations for some reason I just uploaded the .zip into the Packages directory. It's showing up on the package list but has no option to install or anything, and I'm not sure where to look to see if the thing has been installed as I don't know where the options are in the ACP. Any help?!

Thanks!

Use the Package Emulation feature to get this working.

Hm, thanks. It seems that the mod can't find the line "// Show some statistics next to the link tree if SP1 info is off." in "Themes/default/BoardIndex.template.php'. Any ideas where else I could add that edit?

ascaland

Quote from: Tikkuy on March 26, 2013, 09:29:56 AM
Quote from: Anthony` on March 21, 2013, 04:47:32 PM
Quote from: Tikkuy on March 21, 2013, 03:21:22 AM
I'm not sure if I've installed this correctly! When I tried to I recieved an "The package you are trying to download or install is either corrupt or not compatible with this version of SMF" error, but as I'm getting that with all my installations for some reason I just uploaded the .zip into the Packages directory. It's showing up on the package list but has no option to install or anything, and I'm not sure where to look to see if the thing has been installed as I don't know where the options are in the ACP. Any help?!

Thanks!

Use the Package Emulation feature to get this working.

Hm, thanks. It seems that the mod can't find the line "// Show some statistics next to the link tree if SP1 info is off." in "Themes/default/BoardIndex.template.php'. Any ideas where else I could add that edit?

Are you using the latest version (1.5.1)? Which SMF version are you using?

Westwegoman

When I upgrade to PHP 5.4 the settings for this mod and one other mod disappears. The mod itself works, just can't see the settings for it anymore. I went back to PHP 5.2 and it showed up again. I've since switched back up to 5.4 and it's gone again.

Arantor

much the same bug as the other, really.

The changes made to Subs.php (which *really* didn't have to be file edits at all)

Code (find) Select
function integrateModifyModificationsGRN($subActions) {

Code (replace) Select
function integrateModifyModificationsGRN(&$subActions) {

Code (find) Select
function integrateAdminAreasGRN($admin_areas) {

Code (replace) Select
function integrateAdminAreasGRN(&$admin_areas) {/code]

Advertisement: