Jump to content

Club Overview Honours Snapshot Box


Alastairhufc

Recommended Posts

I've been trying to merge bits from multiple skins to add a couple of features to the default skin which I would like to use. I currently have this honours box appearing on my skin:

db4dc3b08b667031edb432218edabaad.png

The code I have for this is:

<widget class="team_container_honours_panel" id="hons">
				<translation id="title" translation_id="349489" type="use" value="All Club Records [COMMENT: team records panel header text; lists all club records underneath]" />
			</widget>	

I want to add two links (or at least 'All Club Honours') to the bottom of the box from this skin:

86ac31bfd8513a72b10eb5dfd7e5d947.png

The two bits of code relating to this are:

<container>
		<layout class="arrange_horizontal_attachment" offset="0" layout="-7,-3" gap="1" />
  	   <layout class="stick_to_sides_attachment" alignment="vertical" layout_children="true" inset="0" />

  <container class="subsection_box">

      <layout class="stick_to_sides_attachment" alignment="all" inset="0" layout_children="true" />
     <translation id="title" translation_id="232146" type="use" value="Honours" />
	 		<widget class="team_container_honours_panel" default_item="true" file="team container honours panel1" id="hons" >

         <record id="object_property">
           <integer id="get_property" value="objt" />
           <integer id="set_property" value="objt" />
         </record>
       	</widget>
	   </container>

<?xml version='1.0' encoding='utf-8'?>
<panel>
 <layout class="stick_to_sides_attachment" alignment="all" layout_children="true" inset="0" />

 <container>

   <layout class="stick_to_sides_attachment" alignment="all" layout_children="true" inset="0" />

   <container class="horizontal_adaptive_container" id="hnrs" default_height="-1">
     <layout class="arrange_horizontal_attachment" alignment="left" />
     <layout class="stick_to_sides_attachment" alignment="vertical" layout_children="true" />

   </container>



</container>
 <container>
   <layout class="arrange_horizontal_attachment" alignment="right" offset="0" />
   <layout class="stick_to_sides_attachment" alignment="bottom" layout_children="true" inset="0" />

           <widget class="link_button" auto_size="all" alignment="centre" section="trov">
             <translation id="text" translation_id="349488" type="use" value="All Club Honours[COMMENT: team records panel header text; lists all club honours underneath]"/>
           </widget>
           <widget class="link_button" auto_size="all" alignment="centre" section="Recs">
             <translation id="text" translation_id="349489" type="use" value="All Club Records[COMMENT: team records panel header text; lists all club records underneath]"/>
           </widget>
         </container>
</panel>

Does anyone know which line of code I need to add in as after trying several times I can't get it to work?

Link to post
Share on other sites

file="team container honours panel1" - did you move this file as well? the code is looking for it

Yes I tried that as well as taking the code and trying to put it in the appropriate place in the other code but it didn't work. The bottom box of code is that file.

Link to post
Share on other sites

Yes I tried that as well as taking the code and trying to put it in the appropriate place in the other code but it didn't work. The bottom box of code is that file.

not the code, the whole xml needs to be in panels folder saved as "team container honours panel1"

Link to post
Share on other sites

You should be able to add the code for the 2 links

<widget class="link_button" auto_size="all" alignment="centre" section="trov">

<translation id="text" translation_id="349488" type="use" value="All Club Honours[COMMENT: team records panel header text; lists all club honours underneath]"/>

</widget>

<widget class="link_button" auto_size="all" alignment="centre" section="Recs">

<translation id="text" translation_id="349489" type="use" value="All Club Records[COMMENT: team records panel header text; lists all club records underneath]"/>

</widget>

Under the last </widget> but before the </container> code in the first xml.

Link to post
Share on other sites

You should be able to add the code for the 2 links

<widget class="link_button" auto_size="all" alignment="centre" section="trov">

<translation id="text" translation_id="349488" type="use" value="All Club Honours[COMMENT: team records panel header text; lists all club honours underneath]"/>

</widget>

<widget class="link_button" auto_size="all" alignment="centre" section="Recs">

<translation id="text" translation_id="349489" type="use" value="All Club Records[COMMENT: team records panel header text; lists all club records underneath]"/>

</widget>

Under the last </widget> but before the </container> code in the first xml.

Ok thanks, that all makes sense but I'm not sure exactly what container text I want to start it? I've tried several different container text strings (<container>, <container id=hons>, <container class="subsection box">) but none of them work.

Currently I have this:

<widget class="team_container_honours_panel" id="hons">
				<translation id="title" translation_id="349489" type="use" value="All Club Records [COMMENT: team records panel header text; lists all club records underneath]" />
			</widget>	
<widget class="link_button" auto_size="all" alignment="centre" section="trov">
<translation id="text" translation_id="349488" type="use" value="All Club Honours[COMMENT: team records panel header text; lists all club honours underneath]"/>
</widget>
<widget class="link_button" auto_size="all" alignment="centre" section="Recs">
<translation id="text" translation_id="349489" type="use" value="All Club Records[COMMENT: team records panel header text; lists all club records underneath]"/>
</widget>
</container>

Link to post
Share on other sites

I'm not putting it into an existing container though, I'm trying to add it in as an option in a snapshot box.

The full code for this box is:

	<!--snapshot selector 1-->
			<container class="client_object_viewer_selector_panel" id="cos1" minimum_height="240" priority="1" default_height="-2">
				<widget class="team_container_overview_teams_panel" id="tcot">
					<translation id="title" translation_id="229362" type="use" value="Teams" />
				</widget>
				<widget class="team_transfer_snapshot_panel" id="Tran" valid_for_fmc="false">
					<translation id="title" translation_id="296337" type="use" value="Pending Transfers" />
				</widget>
				<widget class="team_container_information_background_panel" id="Cbac">
					<translation id="title" translation_id="333728" type="use" value="Club Background[COMMENT: title for panel showing a club's background]" />
				</widget>
			<widget class="club_overview_team_results_panel" id="res1">
			<translation id="title" translation_id="319447" type="use" value="Results[COMMENT: title for the previous set of first team results on the club overview panel]" />
			</widget>			
		          <widget class="finances_short_wage_summary_panel" file="a finances short wage summary" id="fsws">
		            <translation id="title" translation_id="329952" type="use" value="Finance & Salary[COMMENT: manager snapshot/home: wage & finances summary panel heading]" />
		          </widget>		
	            <widget class="team_snapshot_contract_panel" id="tsco"   >
	                <translation id="title" translation_id="255039" type="use" value="Contract Expiry Dates[COMMENT: team contract snapshot panel heading]" />
	            </widget>
	            <widget class="squad_status_snapshot_panel" id="sssn" >
	                <translation id="title" translation_id="227783" type="use" value="Squad Status" />
	                <boolean id="should_force_refresh" value="true" />
	            </widget>	
			[color="#FF0000"][b]<container id="hons">
<widget class="team_container_honours_panel" id="hons">
				<translation id="title" translation_id="349489" type="use" value="All Club Records [COMMENT: team records panel header text; lists all club records underneath]" />
			</widget>	
<widget class="link_button" auto_size="all" alignment="centre" section="trov">
<translation id="text" translation_id="349488" type="use" value="All Club Honours[COMMENT: team records panel header text; lists all club honours underneath]"/>
</widget>
<widget class="link_button" auto_size="all" alignment="centre" section="Recs">
<translation id="text" translation_id="349489" type="use" value="All Club Records[COMMENT: team records panel header text; lists all club records underneath]"/>
</widget>
</container>[/b][/color]
		        <container id="fxt1">
			        <translation id="title" translation_id="348841" type="use" value="Fixtures and Results[COMMENT: title for the previous set of first team results on the club overview panel]" />
			        <layout class="arrange_vertical_attachment" alignment="bottom,extend" offset="0" />
			        <layout class="stick_to_sides_attachment" alignment="horizontal" inset="0" layout_children="true" />
			        <widget class="fixtures_list_panel" id="fix1" file="fixtures list panel mini" >
			          <record id="object_property">
			            <integer id="get_property" value="Tftm" />
			            <integer id="set_property" value="objt" />
			          </record>
			        </widget>
			        <container>
			          <layout class="arrange_horizontal_attachment" alignment="right" offset="0" />
			          <layout class="stick_to_sides_attachment" alignment="top" layout_children="true" inset="0" />
			          <layout class="fit_children_attachment" alignment="vertical" offset="0" />
			          <widget class="link_button" auto_size="horizontal" section="TeFi">
			            <translation id="text" translation_id="349169" type="use" value="View Fixtures[COMMENT: club overview; button which when clicked takes you to the club's affiliated clubs information page]" />
			          </widget>
			        </container>
		        </container>	
				      <container id="Aff1">
				        <translation id="title" translation_id="329679" type="use" value="Affiliated Clubs[COMMENT: how to system; help string]" />
				        <layout class="arrange_vertical_attachment" alignment="bottom,extend" offset="0" />
				        <layout class="stick_to_sides_attachment" alignment="horizontal" inset="0" layout_children="true" />

				        <container>
				          <layout class="stick_to_sides_attachment" alignment="all" inset="0" layout_children="true" />

				          <widget class="client_object_list_table" id="aff1" mode="fill_rows, stripe_rows, keyboard, hide_headings" database_table_type="3">
				            <boolean id="save_session_state" value="true" />

				            <record id="vpid">
				              <record id="Cref" />
				              <record id="CreX" />
				            </record>

				            <record id="object_property">
				              <integer id="get_property" value="Tafc" />
				              <integer id="set_property" value="objt" />
				            </record>
				          </widget>
				        </container>

				        <container id="ACln">
				          <layout class="arrange_horizontal_attachment" alignment="right" offset="0" />
				          <layout class="stick_to_sides_attachment" alignment="top" layout_children="true" inset="0" />
				          <layout class="fit_children_attachment" alignment="vertical" offset="0" />

				          <widget class="link_button" appearance="buttons/link/button" auto_size="all" section="tafi">
				            <translation id="text" translation_id="349166" type="use" value="View Affiliated Clubs[COMMENT: club overview; button which when clicked takes you to the club's affiliated clubs information page]" />
				          </widget>
				        </container>

				      </container>			
			</container>

The <container id="hons"> string is the opening container I need to put (it doesn't work with this string).

Link to post
Share on other sites

Just use this code into the snapshot choices.

<widget class="team_container_honours_panel" default_item="true" file="team container honours panel1" id="hons" >

<record id="object_property">

<integer id="get_property" value="objt" />

<integer id="set_property" value="objt" />

</record>

</widget>

and it will point to the file i jsut gave you with the links and trophies, the snapshot dropdown wont look for just a link button if i remember right.

Link to post
Share on other sites

Just use this code into the snapshot choices.

<widget class="team_container_honours_panel" default_item="true" file="team container honours panel1" id="hons" >

<record id="object_property">

<integer id="get_property" value="objt" />

<integer id="set_property" value="objt" />

</record>

</widget>

and it will point to the file i jsut gave you with the links and trophies, the snapshot dropdown wont look for just a link button if i remember right.

Thanks for that file, I have put it into my panels folder but unfortunately nothing appears (it just says widg).

91dabf53a6107800c877e3b1f341a0ab.png

Link to post
Share on other sites

its named - team container honours panel1 correct?

clear cache and reload the skin.

Ah clearing the cache worked perfectly, I'd just been reloading the skin before. I never realised that was also needed.

That almost works fine now, I just need to add a scroll bar to the bottom as I can only see one trophy currently, I assume that is just a case of altering some sizes though?

Link to post
Share on other sites

Hmm, you can change the inset no, in the 1st line to 0-10 to bring the whole panel inside a border.

That seems to just make it smaller without adding a scrollbar.

I wonder if it could be my screen resolution (I'm on a laptop), in a couple of days I'll be able to connect my laptop to a bigger monitor to see how it is on that.

Link to post
Share on other sites

That seems to just make it smaller without adding a scrollbar.

I wonder if it could be my screen resolution (I'm on a laptop), in a couple of days I'll be able to connect my laptop to a bigger monitor to see how it is on that.

TRY -2 OR -3 in the default height

Link to post
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...