Events source code

Discuss general development subjects that are not specific to a particular version like the versioning control system we use or other infrastructure.
Post Reply
lakall
Registered User
Posts: 1
Joined: Sun Sep 06, 2015 1:01 pm

Events source code

Post by lakall » Sun Sep 06, 2015 1:11 pm

Hey there!
I am new to phpBB development and need to creade a forum with a topic list that shows the list of the topics and for each topic i do have a button that expands a new Div showing the first three posts of the according topic.
The expansion is done with javascript and works. It simply makes a new div visible:
I created a new Template based on Prosilver. I am working on the template files now.
This is part of the code of my vieforum_body.html class of my teplate:

Code: Select all

				<li class="row<!-- IF topicrow.S_ROW_COUNT is even --> bg1<!-- ELSE --> bg2<!-- ENDIF --><!-- IF topicrow.S_POST_GLOBAL --> 						global-announce<!-- ENDIF --><!-- IF topicrow.S_POST_ANNOUNCE --> announce<!-- ENDIF --><!-- IF topicrow.S_POST_STICKY --> sticky<!-- ENDIF --><!-- IF topicrow.S_TOPIC_REPORTED --> reported<!-- ENDIF -->">
			<dl class="icon {topicrow.TOPIC_IMG_STYLE}">
			
				<dt <!-- IF topicrow.TOPIC_ICON_IMG and S_TOPIC_ICONS --> style="background-image: url({T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG}); background-repeat: no-repeat;"<!-- ENDIF --> title="{topicrow.TOPIC_FOLDER_IMG_ALT}">
					
					<div class="list-inner">
					list-inner
						<!-- EVENT topiclist_row_prepend -->
						<!-- IF topicrow.S_UNREAD_TOPIC and not S_IS_BOT --><a href="{topicrow.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF --><a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a>
						<!-- IF topicrow.S_TOPIC_UNAPPROVED or topicrow.S_POSTS_UNAPPROVED --><a href="{topicrow.U_MCP_QUEUE}">{topicrow.UNAPPROVED_IMG}</a> <!-- ENDIF -->
						<!-- IF topicrow.S_TOPIC_DELETED --><a href="{topicrow.U_MCP_QUEUE}">{DELETED_IMG}</a> <!-- ENDIF -->
						<!-- IF topicrow.S_TOPIC_REPORTED --><a href="{topicrow.U_MCP_REPORT}">{REPORTED_IMG}</a><!-- ENDIF --><br />
						
					
						<div id="containerid" style="display:none">Text</div>
						<!-- IF .topicrow.pagination -->
						<div class="pagination">
							<ul>
							<!-- BEGIN pagination -->
								<!-- IF topicrow.pagination.S_IS_PREV -->
								<!-- ELSEIF topicrow.pagination.S_IS_CURRENT --><li class="active"><span>{topicrow.pagination.PAGE_NUMBER}</span></li>
								<!-- ELSEIF topicrow.pagination.S_IS_ELLIPSIS --><li class="ellipsis"><span>{L_ELLIPSIS}</span></li>
								<!-- ELSEIF topicrow.pagination.S_IS_NEXT -->
								<!-- ELSE --><li><a href="{topicrow.pagination.PAGE_URL}">{topicrow.pagination.PAGE_NUMBER}</a></li>
								<!-- ENDIF -->
							<!-- END pagination -->
							</ul>
						</div>
						<!-- ENDIF -->
							
							
						<!-- EVENT topiclist_row_append -->
						
					</div>
					
				</dt>
					<a href="javascript:toggle('containerid')" align="bottom" ><img class="pfeil" height="14px" width="14px" src="./pfeil.png" align="center" ></a>
					
				</dd>
			</dl>
			
		</li>
The javasript code is this:

Code: Select all

<script type="text/javascript">
  function toggle(id){
    var e = document.getElementById(id);
     
    if (e.style.display == "none"){
       e.style.display = "";
    } else {
       e.style.display = "none";
    }
  }
</script>

The problem is that it doesn't create a new container for each topic. I would like to acces the source code of the event that appends the topics to the list. The topiclist_row_append event. But i cannot find it.
I searched the internet for 2 hours now and can't get any information.

Can anyone help me?
Telling me where can i find the source code? Or having any other idea to solve my problem=?


Thanks a lot!!

LAura

tmarone
Registered User
Posts: 8
Joined: Sun Apr 06, 2014 4:38 am

Re: Events source code

Post by tmarone » Mon Sep 07, 2015 4:56 pm


User avatar
hanakin
Infrastructure Team
Infrastructure Team
Posts: 788
Joined: Sat Dec 25, 2010 9:02 pm
Contact:

Re: Events source code

Post by hanakin » Wed Sep 09, 2015 8:53 am

This should be disscussed on .com as it seems that you are attempting to make an extension or customization to your theme. The disscusion here pertains to the improvment of the software platform or default themes for release.

Extensions Disscusion: https://www.phpbb.com/community/viewforum.php?f=496
Styles Disscusion: https://www.phpbb.com/community/viewforum.php?f=481

Post Reply