how to add auto reply after first topic

Support for ANY phpBB3 related issue.
- MOD Support requests should be asked in the specific MOD topic -
Any version of phpBB3 is supported.
Forum rules
READ: StarTrekGuide.com Board Rules

Users are requested to fill out the Support Request Template and include it in every support request.

As a general rule, Support for a Specific MOD should be requested in the specific MOD topic, as it would alert the MOD Author of the support request.
Please specify if you have any MODs installed on your board when asking for support.

phpBB support requests allowed
MOD Requests and Generic discussions not allowed

Re: how to add auto reply after first topic

Postby stitch626 » 06 Jan 2011, 00:21

Go for it Ed. This sounds very cool!! This would come in handy during our busy months when there are too many new members to welcome.
User avatar
stitch626    
STG Moderator Leader
STG Moderator Leader
 
Posts: 3185
Joined: 08 Feb 2007, 20:47
Location: Michigan
Favorite Team: Detroit Red Wings
Gender: Male
phpBB Knowledge: 7




phpBB Academy at StarTrekGuide
Support STG
Using PayPal Donate

Re: how to add auto reply after first topic

Postby Sniper_E » 07 Jan 2011, 00:52

Well, I may have told a lie... I put the include statement in before the <!-- END postrow -->
It pulled that first_response.html template in after the first post on the first page,
but none of the variables would work in that template.

Then I copied the codes and put them directly in the viewtopic_body.html template and it worked.
I don't know why it want work with the <!-- INCLUDE first_response.html -->

This is what I did... Open viewtopic_body.html

FIND
Code: Select all
<!-- END postrow -->

BEFORE ADD
Code: Select all
   <hr class="divider" />
<!-- IF postrow.S_FIRST_ROW and not PREVIOUS_PAGE -->
   <div class="post <!-- IF postrow.S_ROW_COUNT is odd -->bg1<!-- ELSE -->bg2<!-- ENDIF --> online">
      <div class="inner"><span class="corners-top"><span></span></span>
      <div class="postbody">
            <h3><a href="#">Re: {postrow.POST_SUBJECT}</a></h3>
         <p class="author"><a href=""><img src="http://startrekguide.com/community/styles/prosilver/imageset/icon_post_target.gif" alt="Post" title="Post" width="11" height="9"></a>by <strong><a href="http://startrekguide.com/community/memberlist.php?mode=viewprofile&u=512" style="color: rgb(0, 128, 0);" class="username-coloured">Gonculator </a></strong></p>
         <div class="content">Hey <strong>{postrow.POST_AUTHOR}</strong>, Welcome to {SITENAME}!<br /><blockquote><div><cite>Sniper_E wrote:</cite>{postrow.MESSAGE}</div></blockquote><br />Thank you for your post {postrow.POST_AUTHOR}! We are glad to have you with us.<br />Let us know if there is anything we can help you with.<br /><br />Forum Robot</div>
         <div id="sig" class="signature"><strong style="color: green;">I am Gonculator, the STG Forum Robot</strong> -- Please do not PM me, I will not answer, but I will eat users who PM me. <img src="http://startrekguide.com/community/images/smilies/icon_twisted.gif" alt=":twisted:" title="Twisted"></div>
      </div>
         <dl class="postprofile" id="profile512">
         <dt>
            <a href="http://startrekguide.com/community/memberlist.php?mode=viewprofile&u=512"><img src="http://startrekguide.com/community/download/file.php?avatar=512_1209151246.jpg" alt="User avatar" width="124" height="150"></a><br>
            <a href="http://startrekguide.com/community/memberlist.php?mode=viewprofile&amp;u=512" style="color: rgb(0, 128, 0);" class="username-coloured">Gonculator</a>
         </dt>
         <dd>Forum Robot</dd>
         <dd><img src="http://startrekguide.com/community/images/ranks/gonculator.gif" alt"" /></dd>
         <dd>&nbsp;</dd>
         <dd><strong>Joined:</strong> Nov 16, 2006, 9:52 pm</dd>
         <dd><strong>Location:</strong> Forum Robot</dd>
         <dd><strong>Gender:</strong> Male</dd>
      </dl>
      <div class="back2top"><a href="#wrap" class="top" title="Top">Top</a></div>
      <span class="corners-bottom"><span></span></span></div>
   </div>

      <hr class="divider" />
<!-- ENDIF -->

You can see that I hard coded Gonculator's info in the template. Kind of Rough isn't it?
I can do a template for subsilver2 also if it looks OK.
You can also add to that IF statement so it only does this in your "Welcome/Introductions" forum.

Here is what I'm looking at.
Attachments
response.gif
Image
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!
User avatar
Sniper_E    
STG Jedi Master
STG Jedi Master
 
Posts: 6991
Joined: 31 May 2006, 06:29
Location: Shreveport, LA
Favorite Team: The STG Team
Gender: Male
phpBB Knowledge: 6

Re: how to add auto reply after first topic

Postby stitch626 » 07 Jan 2011, 02:19

I like it..Very cool.

I wonder why it wont pull the html file.
User avatar
stitch626    
STG Moderator Leader
STG Moderator Leader
 
Posts: 3185
Joined: 08 Feb 2007, 20:47
Location: Michigan
Favorite Team: Detroit Red Wings
Gender: Male
phpBB Knowledge: 7

Re: how to add auto reply after first topic

Postby altafali » 07 Jan 2011, 13:16

i did what you told like creating a first response html

ever thing goes fine

but i get one problum

when a user add reply to a topic then this auto reply take end??????? why man
altafali    
Cadet I
Cadet I
 
Posts: 14
Joined: 12 Nov 2010, 02:34
Gender: Male
phpBB Knowledge: 1

Re: how to add auto reply after first topic

Postby Sniper_E » 07 Jan 2011, 21:49

The IF statement <!-- IF postrow.S_FIRST_ROW --> will only allow it to be posted once, only after the first row.
The added and not PREVIOUS_PAGE part of that IF statement will only allow it to be posted on the first page.

Just tested again on my local and those two IF statements above work as expected.

INSTALL INSTRUCTIONS
Open styles/prosilver/template/viewtopic_body.html

FIND
Code: Select all
   <div id="p{postrow.POST_ID}" class="post <!-- IF postrow.S_ROW_COUNT is odd -->bg1<!-- ELSE -->bg2<!-- ENDIF --><!-- IF postrow.S_UNREAD_POST --> unreadpost<!-- ENDIF --><!-- IF postrow.S_POST_REPORTED --> reported<!-- ENDIF --><!-- IF postrow.S_ONLINE and not postrow.S_IGNORE_POST --> online<!-- ENDIF -->">
FIND INLINE
Code: Select all
<!-- IF postrow.S_ROW_COUNT is odd -->bg1<!-- ELSE -->bg2<!-- ENDIF -->
REPLACE WITH
Code: Select all
<!-- IF postrow.S_FIRST_ROW and not PREVIOUS_PAGE --><!-- IF postrow.S_ROW_COUNT is odd -->bg2<!-- ELSE -->bg1<!-- ENDIF --><!-- ELSE --><!-- IF postrow.S_ROW_COUNT is odd -->bg1<!-- ELSE -->bg2<!-- ENDIF --><!-- ENDIF -->

FIND
Code: Select all
<!-- END postrow -->
BEFORE ADD
Code: Select all
<!-- IF postrow.S_FIRST_ROW and not PREVIOUS_PAGE -->
<!-- INCLUDE first_response.html -->
<!-- ENDIF -->

And then you created a first_response.html template and put it in the template directory? Refreshed templates?
I could not get it to pull the info for {postrow.POST_SUBJECT}, {postrow.POST_AUTHOR} or anything.

I had to add it in like this...

FIND
Code: Select all
<!-- END postrow -->
BEFORE ADD
Code: Select all
    <!-- IF postrow.S_FIRST_ROW and not PREVIOUS_PAGE -->
       <div class="post <!-- IF postrow.S_ROW_COUNT is odd -->bg1<!-- ELSE -->bg2<!-- ENDIF --> online">
          <div class="inner"><span class="corners-top"><span></span></span>
          <div class="postbody">
                <h3><a href="#">Re: {postrow.POST_SUBJECT}</a></h3>
             <p class="author"><a href=""><img src="http://startrekguide.com/community/styles/prosilver/imageset/icon_post_target.gif" alt="Post" title="Post" width="11" height="9"></a>by <strong><a href="http://startrekguide.com/community/memberlist.php?mode=viewprofile&u=512" style="color: rgb(0, 128, 0);" class="username-coloured">Gonculator </a></strong></p>
             <div class="content">Hey <strong>{postrow.POST_AUTHOR}</strong>, Welcome to {SITENAME}!<br /><blockquote><div><cite>Sniper_E wrote:</cite>{postrow.MESSAGE}</div></blockquote><br />Thank you for your post {postrow.POST_AUTHOR}! We are glad to have you with us.<br />Let us know if there is anything we can help you with.<br /><br />Forum Robot</div>
             <div id="sig" class="signature"><strong style="color: green;">I am Gonculator, the STG Forum Robot</strong> -- Please do not PM me, I will not answer, but I will eat users who PM me. <img src="http://startrekguide.com/community/images/smilies/icon_twisted.gif" alt=":twisted:" title="Twisted"></div>
          </div>
             <dl class="postprofile" id="profile512">
             <dt>
                <a href="http://startrekguide.com/community/memberlist.php?mode=viewprofile&u=512"><img src="http://startrekguide.com/community/download/file.php?avatar=512_1209151246.jpg" alt="User avatar" width="124" height="150"></a><br>
                <a href="http://startrekguide.com/community/memberlist.php?mode=viewprofile&amp;u=512" style="color: rgb(0, 128, 0);" class="username-coloured">Gonculator</a>
             </dt>
             <dd>Forum Robot</dd>
             <dd><img src="http://startrekguide.com/community/images/ranks/gonculator.gif" alt"" /></dd>
             <dd>&nbsp;</dd>
             <dd><strong>Joined:</strong> Nov 16, 2006, 9:52 pm</dd>
             <dd><strong>Location:</strong> Forum Robot</dd>
             <dd><strong>Gender:</strong> Male</dd>
          </dl>
          <div class="back2top"><a href="#wrap" class="top" title="Top">Top</a></div>
          <span class="corners-bottom"><span></span></span></div>
       </div>

          <hr class="divider" />
    <!-- ENDIF -->

I had to put the codes from my first_response.html template in my viewtopic_body.html template to make it work.
Yours does work by using the include statement? You can pull the post author's name into the response post?
You should be able to pull any info of the posting author's into your response.
That include statement wouldn't do that for me.
Image
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!
User avatar
Sniper_E    
STG Jedi Master
STG Jedi Master
 
Posts: 6991
Joined: 31 May 2006, 06:29
Location: Shreveport, LA
Favorite Team: The STG Team
Gender: Male
phpBB Knowledge: 6

Re: how to add auto reply after first topic

Postby altafali » 08 Jan 2011, 00:08

i need edits for subsilver2
altafali    
Cadet I
Cadet I
 
Posts: 14
Joined: 12 Nov 2010, 02:34
Gender: Male
phpBB Knowledge: 1

Re: how to add auto reply after first topic

Postby Sniper_E » 09 Jan 2011, 16:55

PROSILVER INSTRUCTIONS
Open styles/prosilver/template/viewtopic_body.html

FIND
Code: Select all
   <div id="p{postrow.POST_ID}" class="post <!-- IF postrow.S_ROW_COUNT is odd -->bg1<!-- ELSE -->bg2<!-- ENDIF --><!-- IF postrow.S_UNREAD_POST --> unreadpost<!-- ENDIF --><!-- IF postrow.S_POST_REPORTED --> reported<!-- ENDIF --><!-- IF postrow.S_ONLINE and not postrow.S_IGNORE_POST --> online<!-- ENDIF -->">
FIND INLINE
Code: Select all
<!-- IF postrow.S_ROW_COUNT is odd -->bg1<!-- ELSE -->bg2<!-- ENDIF -->
REPLACE WITH
Code: Select all
<!-- IF postrow.S_FIRST_ROW and not PREVIOUS_PAGE --><!-- IF postrow.S_ROW_COUNT is odd -->bg2<!-- ELSE -->bg1<!-- ENDIF --><!-- ELSE --><!-- IF postrow.S_ROW_COUNT is odd -->bg1<!-- ELSE -->bg2<!-- ENDIF --><!-- ENDIF -->

FIND
Code: Select all
<!-- END postrow -->
BEFORE ADD
Code: Select all
<!-- IF postrow.S_FIRST_ROW and not PREVIOUS_PAGE -->
<!-- INCLUDE first_response.html -->
<!-- ENDIF -->

And then you created a first_response.html template and put it in the prosilver/template/ directory?
Code: Select all
   <div class="post <!-- IF postrow.S_ROW_COUNT is odd -->bg1<!-- ELSE -->bg2<!-- ENDIF --> online">
      <div class="inner"><span class="corners-top"><span></span></span>
      <div class="postbody">
            <h3><a href="#p{postrow.POST_ID}">Re: {postrow.POST_SUBJECT}</a></h3>
         <p class="author"><!-- IF S_IS_BOT -->{postrow.MINI_POST_IMG}<!-- ELSE --><a href="{postrow.U_MINI_POST}">{postrow.MINI_POST_IMG}</a><!-- ENDIF -->{L_POST_BY_AUTHOR} <strong><a href="http://startrekguide.com/community/memberlist.php?mode=viewprofile&u=512" style="color: rgb(0, 128, 0);" class="username-coloured">Gonculator</a></strong> &raquo; {postrow.POST_DATE}</p>
         <div class="content">Hey <strong>{postrow.POST_AUTHOR}</strong>, Welcome to {SITENAME}!<br /><blockquote><div><cite>{postrow.POST_AUTHOR} wrote:</cite>{postrow.MESSAGE}</div></blockquote><br />Thank you for your post {postrow.POST_AUTHOR}! We are glad to have you with us.<br />Let us know if there is anything we can help you with.<br /><br />Forum Robot</div>
         <div id="sig" class="signature"><strong style="color: green;">I am Gonculator, the STG Forum Robot</strong> -- Please do not PM me, I will not answer, but I will eat users who PM me. <img src="http://startrekguide.com/community/images/smilies/icon_twisted.gif" alt=":twisted:" title="Twisted"></div>
      </div>
         <dl class="postprofile" id="profile512">
         <dt>
            <a href="http://startrekguide.com/community/memberlist.php?mode=viewprofile&u=512"><img src="http://startrekguide.com/community/download/file.php?avatar=512_1209151246.jpg" alt="User avatar" width="124" height="150"></a><br>
            <a href="http://startrekguide.com/community/memberlist.php?mode=viewprofile&amp;u=512" style="color: rgb(0, 128, 0);" class="username-coloured">Gonculator</a>
         </dt>
         <dd>Forum Robot</dd>
         <dd><img src="http://startrekguide.com/community/images/ranks/gonculator.gif" alt"" /></dd>
         <dd>&nbsp;</dd>
         <dd><strong>Joined:</strong> Nov 16, 2006, 9:52 pm</dd>
         <dd><strong>Location:</strong> Forum Robot</dd>
         <dd><strong>Gender:</strong> Male</dd>
      </dl>
      <div class="back2top"><a href="#wrap" class="top" title="Top">Top</a></div>
      <span class="corners-bottom"><span></span></span></div>
   </div>

      <hr class="divider" />


SUBSILVER2 INSTRUCTIONS
Open styles/subsilver2/template/viewtopic_body.html

FIND
Code: Select all
   <!-- IF postrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
REPLACE WITH
Code: Select all
   <!-- IF postrow.S_FIRST_ROW and not PREVIOUS_PAGE --><!-- IF postrow.S_ROW_COUNT is even --><tr class="row2"><!-- ELSE --><tr class="row1"><!-- ENDIF --><!-- ELSE --><!-- IF postrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF --><!-- ENDIF -->
There are 3 places in your template where this needs to be changed.

In the <!-- BEGIN attachment --> section FIND INLINE
Code: Select all
<!-- IF postrow.S_ROW_COUNT is even --><tr class="row2"><!-- ELSE --><tr class="row1"><!-- ENDIF -->
REPLACE WITH
Code: Select all
<!-- IF postrow.S_FIRST_ROW and not PREVIOUS_PAGE --><!-- IF postrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF --><!-- ELSE --><!-- IF postrow.S_ROW_COUNT is even --><tr class="row2"><!-- ELSE --><tr class="row1"><!-- ENDIF --><!-- ENDIF -->

FIND
Code: Select all
<!-- END postrow -->
BEFORE ADD
Code: Select all
<!-- IF postrow.S_FIRST_ROW and not PREVIOUS_PAGE -->
<!-- INCLUDE first_response.html -->
<!-- ENDIF -->

And then you created a first_response.html template and put it in the subsilver2/template/ directory?
Code: Select all
   <table class="tablebg" width="100%" cellspacing="1">
   <!-- IF postrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
         <td align="center" valign="middle"><strong><a href="http://startrekguide.com/community/memberlist.php?mode=viewprofile&u=512" style="color: rgb(0, 128, 0);" class="username-coloured">Gonculator</a></strong></td>
         <td width="100%" height="25">
            <table width="100%" cellspacing="0">
            <tr>
            <!-- IF postrow.POST_ICON_IMG -->
               <td><img src="{T_ICONS_PATH}{postrow.POST_ICON_IMG}" width="{postrow.POST_ICON_IMG_WIDTH}" height="{postrow.POST_ICON_IMG_HEIGHT}" alt="" title="" /></td>
            <!-- ENDIF -->
               <td class="gensmall" width="100%"><div style="float: {S_CONTENT_FLOW_BEGIN};">&nbsp;<b>{L_POST_SUBJECT}:</b> Re: {postrow.POST_SUBJECT}</div><div style="float: {S_CONTENT_FLOW_END};"><!-- IF S_IS_BOT -->{postrow.MINI_POST_IMG}<!-- ELSE --><a href="{postrow.U_MINI_POST}">{postrow.MINI_POST_IMG}</a><!-- ENDIF --><b>{L_POSTED}:</b> {postrow.POST_DATE}&nbsp;</div></td>
            </tr>
            </table>
         </td>
      </tr>
      <!-- IF postrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
         <td valign="top" class="profile">
            <table cellspacing="4" align="center" width="150">
            <tr>
               <td><img src="http://startrekguide.com/community/styles/subsilver2/imageset/en/icon_user_online.gif" alt=""></td>
            </tr>
            <tr>
               <td class="postdetails">Forum Robot</td>
            </tr>
            <tr>
               <td><img src="http://startrekguide.com/community/images/ranks/gonculator.gif" alt"" /></td>
            </tr>
            <tr>
               <td><img src="http://startrekguide.com/community/download/file.php?avatar=512_1209151246.jpg" alt="User avatar" width="124" height="150"></td>
            </tr>
            </table>

            <span class="postdetails">
               <br /><b>{L_JOINED}:</b> Nov 16, 2006, 9:52 pm
               <br /><b>{L_LOCATION}:</b> Forum Robot
               <br /><b>Gender:</b> Male
         </td>
         <td valign="top">
            <table width="100%" cellspacing="5">
            <tr>
               <td>
                  <div class="postbody">Hey <strong>{postrow.POST_AUTHOR}</strong>, Welcome to {SITENAME}!<br /><div class="quotetitle">{postrow.POST_AUTHOR} wrote:</div><div class="quotecontent">{postrow.MESSAGE}</div><br>Thank you for your post {postrow.POST_AUTHOR}! We are glad to have you with us.<br />Let us know if there is anything we can help you with.<br /><br />Forum Robot</div>
                  <div class="postbody"><br />_________________<br /><strong style="color: green;">I am Gonculator, the STG Forum Robot</strong> -- Please do not PM me, I will not answer, but I will eat users who PM me. <img src="http://startrekguide.com/community/images/smilies/icon_twisted.gif" alt=":twisted:" title="Twisted"></div>
               </td>
            </tr>
            </table>
         </td>
      </tr>
      <!-- IF postrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
         <td class="profile"><strong><a href="#wrapheader">{L_BACK_TO_TOP}</a></strong></td>
         <td><div class="gensmall" style="float: {S_CONTENT_FLOW_BEGIN};">&nbsp;<a href="http://startrekguide.com/community/memberlist.php?mode=viewprofile&u=512">{PROFILE_IMG}</a></div></td>
      </tr>
   <tr>
      <td class="spacer" colspan="2" height="1"><img src="images/spacer.gif" alt="" width="1" height="1" /></td>
   </tr>
   </table>

Refresh prosilver and subsilver2 templates in ACP.

Please tell me how that works for you.

Here are the 2 templates:
Attachments
first_response_templates.zip
(3.02 KiB) Downloaded 11 times
Image
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!
User avatar
Sniper_E    
STG Jedi Master
STG Jedi Master
 
Posts: 6991
Joined: 31 May 2006, 06:29
Location: Shreveport, LA
Favorite Team: The STG Team
Gender: Male
phpBB Knowledge: 6

Re: how to add auto reply after first topic

Postby Sniper_E » 10 Jan 2011, 11:23

You do not need to create a forum robot. You can use an existing member if you like.
Image
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!
User avatar
Sniper_E    
STG Jedi Master
STG Jedi Master
 
Posts: 6991
Joined: 31 May 2006, 06:29
Location: Shreveport, LA
Favorite Team: The STG Team
Gender: Male
phpBB Knowledge: 6

Re: how to add auto reply after first topic

Postby stitch626 » 19 Apr 2011, 18:18

Hey Ed is there a way to specify and limit this mod to a certain forum?
User avatar
stitch626    
STG Moderator Leader
STG Moderator Leader
 
Posts: 3185
Joined: 08 Feb 2007, 20:47
Location: Michigan
Favorite Team: Detroit Red Wings
Gender: Male
phpBB Knowledge: 7

Re: how to add auto reply after first topic

Postby Sniper_E » 19 Apr 2011, 21:45

Yes, but I'm not sure off the top of my head what the IF statement would be to add.

The IF statement <!-- IF postrow.S_FIRST_ROW --> will only allow it to be posted once, only after the first row.
The added and not PREVIOUS_PAGE part of that IF statement will only allow it to be posted on the first page.
Adding another and S_FORUM_NAME eq "Welcome" part of that IF statement should work only in that forum.

I don't know exactly how to write that forum_id = statement.
and S_FORUM_ID eq "41"
and S_FORUM_ID == 41
I don't know.
<!-- IF postrow.S_FIRST_ROW and not PREVIOUS_PAGE and S_FORUM_NAME eq "Welcome" -->
... ... ... Only after the first post... only on the first page... only in the Welcome forum...
Image
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!
User avatar
Sniper_E    
STG Jedi Master
STG Jedi Master
 
Posts: 6991
Joined: 31 May 2006, 06:29
Location: Shreveport, LA
Favorite Team: The STG Team
Gender: Male
phpBB Knowledge: 6

PreviousNext

Return to phpBB3 Support

Who is online

Users browsing this forum: Alexa [Bot], Google [Bot] and 19 guests