TinyPortal

Development => Support => Topic started by: teatephi on May 31, 2009, 06:17:25 PM

Title: HELP editing custom action when adding a "New Block"
Post by: teatephi on May 31, 2009, 06:17:25 PM
I added a new Script block to my site.
I want it to show up only when someone is posting or replying.  so I need a custom action = post, only that doesn't work.
I noticed there is more info in the address bar (topic=1721.0; num_reply=0)

What should I type in the box to get it to show for ALL posts, not just topic 1721.0.

Thanks!
(https://www.tinyportal.net/index.php?action=dlattach;topic=29810.0;attach=19762;image)


Link to my site: http://www.shepherdsdisciples.com
Powered by SMF 1.1.9 | SMF Ã,© 2006-2009, Simple Machines LLC
TinyPortal v0.9.8 Ã,© Bloc
Manuscript design by Bloc Browser Name and Version: Opera 9.64
Mods installed:
Mod Name   Version   
1.   XarSmilies-1   1.0    [ Apply Mod ] [ List Files ] [ Delete ]
2.   TinyPortal   0.983     [ Uninstall ] [ List Files ] [ Delete ]
3.   FontandSizeDropdown_1.2   1.3     [ Uninstall ] [ List Files ] [ Delete ]
4.   Simple Award System   2.0.0.4b    [ List Files ] [ Delete ]
5.   Bookmarks   1.1    [ List Files ] [ Delete ]
6.   Custom BBCode   2.00     [ Uninstall ] [ List Files ] [ Delete ]
7.   Link Thumbnail   1.0     [ Uninstall ] [ List Files ] [ Delete ]
8.   SMF Media Gallery   1.5 RC 3.2     [ Uninstall ] [ List Files ] [ Delete ]
9.   Bible - Books of Law   1.0    [ Apply Mod ] [ List Files ] [ Delete ]
10.   Bible - Books of History   1.0    [ Apply Mod ] [ List Files ] [ Delete ]
11.   Bible - Books of Poetry   1.0    [ Apply Mod ] [ List Files ] [ Delete ]
12.   Bible - Books of Prophets   1.0    [ Apply Mod ] [ List Files ] [ Delete ]
13.   Bible - New Testament   1.0    [ Apply Mod ] [ List Files ] [ Delete ]
14.   Bible Tag   1.1     [ Uninstall ] [ List Files ] [ Delete ]
15.   ShowTopics   1.1     [ Uninstall ] [ List Files ] [ Delete ]
16.   Signature Dropdown Choices   1.0     [ Uninstall ] [ List Files ] [ Delete ]
17.   Googlebot & Spiders Mod   2.0.3    [ Apply Mod ] [ List Files ] [ Delete ]
18.   FlashChat Integration   1.0     [ Uninstall ] [ List Files ] [ Delete ]
19.   SMF 1.0.13 / 1.1.5 / 2.0 b3.1 Update   1.0    [ List Files ] [ Delete ]
20.   Attachments layout   1.3     [ Uninstall ] [ List Files ] [ Delete ]
21.   Enhanced Profile   1.1.5     [ Uninstall ] [ List Files ] [ Delete ]
22.   Profile Comments   1.4     [ Uninstall ] [ List Files ] [ Delete ]
23.   Profile User Action   1.1     [ Uninstall ] [ List Files ] [ Delete ]
24.   Googlebot & Spiders Mod   2.0.4    [ Apply Mod ] [ List Files ] [ Delete ]
25.   Auto Embed Video/Audio Clips   4.0.2     [ Uninstall ] [ List Files ] [ Delete ]
26.   Profile_Visitors   4.0     [ Uninstall ] [ List Files ] [ Delete ]
27.   Custom Profile Field Mod   3.19     [ Uninstall ] [ List Files ] [ Delete ]
28.   Bookmarks   2.2.1     [ Uninstall ] [ List Files ] [ Delete ]
29.   mp3 Flash Player BBC Tag (XHTML Compliant)   1.0     [ Uninstall ] [ List Files ] [ Delete ]
30.   Anti-Bot Registration Puzzles   1.2     [ Uninstall ] [ List Files ] [ Delete ]
31.   Are You Human? Anti-Bot Registration Check   1.3     [ Uninstall ] [ List Files ] [ Delete ]
32.   reCAPTCHA for SMF   0.9.5.3     [ Uninstall ] [ List Files ] [ Delete ]
33.   User Email System   1.3     [ Uninstall ] [ List Files ] [ Delete ]
34.   Prettier_Quotes   1.12     [ Uninstall ] [ List Files ] [ Delete ]
35.   Last Topics of Person   1.0    [ Apply Mod ] [ List Files ] [ Delete ]
36.   SMF 1.0.16 / 1.1.8 Update   1.0     [ List Files ] [ Delete ]
37.   SMF 1.0.17 / 1.1.9 / 2.0 RC1 Update   1.0     [ Uninstall ] [ List Files ] [ Delete ]
Related Error messages:NO Error message
Title: Re: HELP editing custom action when adding a "New Block"
Post by: IchBin on May 31, 2009, 06:58:46 PM
Unfortunately, the post action is not working in TP 0.9.8. That has been fixed however in the TP 1.x releases. So you'll either need to upgrade, or try some custom PHP code to get it to display the way you want. Let us know what you'd like to do.
Title: Re: HELP editing custom action when adding a "New Block"
Post by: teatephi on May 31, 2009, 07:30:36 PM
I'd like to upgrade to 1.x,  if there's not any conflicts with SMF 1.1.9
Title: Re: HELP editing custom action when adding a "New Block"
Post by: ZarPrime on May 31, 2009, 09:06:09 PM
teatephi,

If you want to install the latest TP 1.0 beta 4, which is the one that you should install, then you will need to uninstall TP 0.98 first.

1.  If you have very many members, you might want to let your members know a day or so in advance that the Forum is going to be upgraded and may be offline for a couple of hours.
2.  Set your Forum to the SMF default theme
3.  Put the Forum into Maintenance Mode.
4.  Backup your Forum and database.
5.  Use the Package Manager to uninstall TP 0.98.  You have a lot of Mods so you might get errors.  If you do, then go through the manual uninstall.  Let us know if you need help doing that.
6.  Use the Package Manager to install TP 1.0 beta 4.
7.  Finally, take the Forum back out of Maintenance Mode and you should be good to go.

You'll be glad that you did the upgrade. ;)

ZarPrime
Title: Re: HELP editing custom action when adding a "New Block"
Post by: teatephi on May 31, 2009, 10:05:54 PM
Yes I have done a lot of manual modifications. :uglystupid2:

Because of that my default theme is messed up.  It still works though, the main forum block is actually below the big blank space.
Should I worry about that? Or not and go ahead with the update?

I also read somewhere that you have to manually add the forum tab back in?  I also have a bookmarks tab and a couple others that I manually added before.  I guess I 'd have to re-add them again too?



When I re-installed an index.template file from 1.1.7  the default theme worked fine.  So no need to consider that.   
Title: Re: HELP editing custom action when adding a "New Block"
Post by: IchBin on June 01, 2009, 02:49:57 AM
If the mods don't show, then of course you need to add them back. :)
Title: Re: HELP editing custom action when adding a "New Block"
Post by: teatephi on June 01, 2009, 03:30:52 AM
YEAH! I'm gonna need some instructions to uninstall manually.  I found http://www.tinyportal.net/index.php/topic,23026.0.html , but I don't think that tells me how to manually uninstall.  It said something about upgrading my SMF, and I don't have any SMF files for 1.1.9 on my computer, so I guess I can't do that step.

Any help will be much appreciated.

.   Execute Modification   ./index.php   Test successful
2.   Execute Modification   ./Sources/Load.php   Test successful
3.   Execute Modification   ./Themes/default/index.template.php   Test failed
4.   Execute Modification   ./Themes/babylon/index.template.php   File not found
5.   Execute Modification   ./Sources/Subs.php   Test successful
6.   Execute Modification   ./Sources/ManagePermissions.php   Test successful
7.   Execute Modification   ./Sources/Security.php   Test successful
8.   Execute Modification   ./Sources/Errors.php   Test successful
9.   Execute Modification   ./Themes/default/style.css   Test successful
10.   Execute Modification   ./Themes/default/Help.template.php   Test successful
11.   Execute Modification   ./Sources/Profile.php   Test failed
12.   Execute Modification   ./SSI.php   Test successful
Title: Re: HELP editing custom action when adding a "New Block"
Post by: IchBin on June 01, 2009, 04:52:32 AM
If you need to uninstall just follow the manual install in reverse.

Follow the Docs link at the top of the forum. :)
Title: Re: HELP editing custom action when adding a "New Block"
Post by: teatephi on June 01, 2009, 12:21:04 PM
Ok so I'm going to edit the two failed files manually, and then I'll use the package manager to uninstall the rest.  Does that sound like a good idea? 


Also, do I have to run this file again to uninstall?
Quote
Further, you will need to run "manual_tp_install.php" (or whatever it's called) in your browser directly. That is, if you installed TP to "http://www.mysite.com/smf/" and "/public_html/smf/," you will need to put "http://www.mysite.com/smf/manual_tp_install.php" into your browser's address bar and run it. Likewise, if you installed TP to "http://www.mysite.com/" and "/public_html/," you will need to put "http://www.mysite.com/manual_tp_install.php" into your browser's address bar and run it.

My Index.template file is really different than both the mod instructions before and after edits.

For example my file says this:
// Output any remaining HTML headers. (from mods, maybe?)
echo $context['html_headers'], '

<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var current_header = ', empty($options['collapse_header']) ? 'false' : 'true', ';

function shrinkHeader(mode)
{';

// Guests don't have theme options!!
if ($context['user']['is_guest'])
echo '
document.cookie = "upshrink=" + (mode ? 1 : 0);';
else
echo '
smf_setThemeOption("collapse_header", mode ? 1 : 0, null, "', $context['session_id'], '");';

echo '
document.getElementById("upshrink").src = smf_images_url + (mode ? "/upshrink2.gif" : "/upshrink.gif");

document.getElementById("upshrinkHeader").style.display = mode ? "none" : "";
document.getElementById("upshrinkHeader2").style.display = mode ? "none" : "";

current_header = mode;
}
// ]]></script>';

// the routine for the info center upshrink
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var current_header_ic = ', empty($options['collapse_header_ic']) ? 'false' : 'true', ';

function shrinkHeaderIC(mode)
{';

if ($context['user']['is_guest'])
echo '
document.cookie = "upshrinkIC=" + (mode ? 1 : 0);';
else
echo '
smf_setThemeOption("collapse_header_ic", mode ? 1 : 0, null, "', $context['session_id'], '");';

echo '
document.getElementById("upshrink_ic").src = smf_images_url + (mode ? "/expand.gif" : "/collapse.gif");

document.getElementById("upshrinkHeaderIC").style.display = mode ? "none" : "";

current_header_ic = mode;
}
// ]]></script>
</head>
<body>';


and I'm supposed to delete this:

  <script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
                var current_leftbar = ', empty($options['collapse_leftbar']) ? 'false' : 'true', ';

                function shrinkHeaderLeftbar(mode)
                {';

        // Guests don't have theme options!!
        if ($context['user']['is_guest'])
                echo '
                        document.cookie = "upshrink=" + (mode ? 1 : 0);';
        else
                echo '
                        smf_setThemeOption("collapse_leftbar", mode ? 1 : 0, null, "', $context['session_id'], '");';
        echo '
                        document.getElementById("upshrinkLeftbar").src = smf_images_url + (mode ? "/upshrink2.gif" : "/upshrink.gif");

                        document.getElementById("leftbarHeader").style.display = mode ? "none" : "";

                        current_leftbar = mode;
                }
          // ]]></script>
       <script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
                var current_rightbar = ', empty($options['collapse_rightbar']) ? 'false' : 'true', ';

                function shrinkHeaderRightbar(mode)
                {';

        // Guests don't have theme options!!
        if ($context['user']['is_guest'])
                echo '
                        document.cookie = "upshrink=" + (mode ? 1 : 0);';
        else
                echo '
                        smf_setThemeOption("collapse_rightbar", mode ? 1 : 0, null, "', $context['session_id'], '");';

        echo '
                        document.getElementById("upshrinkRightbar").src = smf_images_url + (mode ? "/upshrink2.gif" : "/upshrink.gif");

                        document.getElementById("rightbarHeader").style.display = mode ? "none" : "";

                        current_rightbar = mode;
                }
        // ]]></script>


My file has this whole "routine for center upshrink" different from the one I'm supposed to delete.  Shall I delete it?


THE REST OF THE EDITS ARE SIMPLY NOT IN THE FILE.  This is probably because I replaced this file with 1.1.7's upgrade package.

Whew I'm surprised TP worked at all!

The Profile.php file I uninstalled manually without a hitch, ready to upload that one.

Thanks for all your Genius Help!
Title: Re: HELP editing custom action when adding a "New Block"
Post by: IchBin on June 01, 2009, 02:24:04 PM
You can leave the javascript in there. That code is usually in every SMF theme unless its been altered by the theme author.
Title: Re: HELP editing custom action when adding a "New Block"
Post by: teatephi on June 01, 2009, 03:30:26 PM
Ok uninstall is successful , I think.

When I went to install the only error is this one:
10.   Execute Modification   ./Themes/babylon/index.template.php   File not found

but I don't think that one matters so I went ahead and installed.



Ok, so only two problems now.  The left block is no longer where it was in this theme. (see screen shots below).

And I tried to install the shoutbox, but there is no tab that says "uploaded modules"(see below).
Title: Re: HELP editing custom action when adding a "New Block"
Post by: ZarPrime on June 01, 2009, 04:43:47 PM
teatephi,

I don't want to get into this topic because it sounds like you're doing OK on your own, but I have a quick question for you.  In the fifth post in this topic, you posted a pic of your Forum showing the default SMF theme that was totally messed up.  If you haven't fixed your Forum so that it looks right in the SMF Core theme, you are going to run into other problems because a lot stuff runs off the Core theme.  Out of curiosity, is the SMF default theme fixed now.  If not, you need to do that as well.

ZarPrime
Title: Re: HELP editing custom action when adding a "New Block"
Post by: teatephi on June 01, 2009, 04:50:09 PM
Yeah I got it fixed (uploaded index.template from 1.1.7), then I installed TP 1.0.

I can't get anything in the far left column, like before.  I'm not sure if the theme itself needs to be updated by the author for TP 1.0.  I couldn't find an update.

You were right, I do like the new TP.  Lots of options that seemed to be missing before.

Only I still can't activate the shoutbox . . .

When I click on it, it says:

An Error Has Occurred!
Unable to load the 'main' template.
Title: Re: HELP editing custom action when adding a "New Block"
Post by: ZarPrime on June 01, 2009, 05:17:04 PM
teatephi,

If you want to setup a temp admin account so that I can look inside, I'll see if I can get your shoutbox showing if you're still having problems getting it to show up.  Just PM me the details.

On your question above, the sidebar in the manuscript theme is not designed to show the left panel (the place where the blocks are shown).  However, you can add something in there if you want to (html/script).  Just go to Admin --> Configuration --> Current Theme and, under "Theme Options and Preferences", you'll see a text entry box where you can add your own code.

ZarPrime
Title: Re: HELP editing custom action when adding a "New Block"
Post by: teatephi on June 02, 2009, 01:37:39 AM
Well I got the shoutbox working, but I don't know how cause my husband went in to admin and fixed it! LOL   He said he just turned it on and selected TP module or something.  So thanks everyone!  Now I'm updated! :up:
Title: Re: HELP editing custom action when adding a "New Block"
Post by: ZarPrime on June 02, 2009, 02:12:11 AM
Hi teatephi,

I'm glad you got everything working good now.  And thanks for marking the topic solved.

Good Job. :up: ;)

ZarPrime