Home arrow Joomla arrow Forums


here
Simple By Design Forums
Welcome, Guest
Please Login or Register.    Lost Password?
Re:Please help admin (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: Re:Please help admin
#280
blakey87 (User)
Fresh Boarder
Posts: 6
graphgraph
User Offline Click here to see the profile of this user
Please help admin 7 Months, 2 Weeks ago Karma: 0  
Im using a component which uses tables, but it seems as if every time I apply what the instructions tel me, the sdite stops loading, please tell me were I could be going wrong

Code:

echo "<table id='test' width='100%' cellspacing='1' cellpadding='1'>"; echo "<tr><td>Rank</td> <td>Description</td> <td align='center'>Hits In</td> <td align='center'>Hits Out</td> </tr>"; $c_switch = 0; // color switch $count = 0; // count members rank if ($rows){ foreach ( $rows as $row ) { $count+=1; echo "<tr class='". $tabclass[$c_switch] ." '>"; //*** need to make a HTML_topsites::displayTr //Display Rank HTML_topsites::displayColumn(" $count)",''); //Display Description $link = "<a href='index.php?option=com_topsites&id=". $row->id ."&task=out' target='_blank'>". $row->name ."</a>"; HTML_topsites::displayColumn($link . "<br>$row->description",''); //Display Hits In HTML_topsites::displayColumn($row->hitsIn,'center'); //Display Hits Out HTML_topsites::displayColumn($row->hitsOut,'center'); echo "</td> </tr>"; $c_switch = 1 - $c_switch; } } //display "Add your site here!" for ($i = $count; $i < $tsconfig->numoflinks; $i++) { $count+=1; echo "<tr class='". $tabclass[$c_switch] ." '>"; //Display Rank HTML_topsites::displayColumn(" $count)",''); //Display Description HTML_topsites::displayColumn("<a href='index.php?option=com_topsites&task=signup'>Add your site here!</a><br><br>",''); //Display Hits In HTML_topsites::displayColumn(0,'center'); //Display Hits Out HTML_topsites::displayColumn(0,'center'); echo "</td> </tr>"; $c_switch = 1 - $c_switch; } //Table footer echo "</table>"; echo "{ sbdnicertables titleId=test} *";
I hope you could help as this mambot is something Iv been looking for - for a while
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#288
SimpleByDesign (Admin)
Admin
Posts: 290
graph
User Online Now Click here to see the profile of this user
Re:Please help admin 7 Months, 2 Weeks ago Karma: 9  
Hi,

Sorry for the delay. A few things from your code - technically you don't need the colour switch as this mambot will perform that for you, as I don't know which formatting may take precedence etc...

The most obvious is the line calling the mambot is wrong so it'll not actually envoke the mambot. The correct call should be:

{sbdnicertables tableid=test}

Does this component enable the use of mambots on its content? not all components to our knowledge enable this.

Kind Regards<br><br>Post edited by: SimpleByDesign, at: 2008/04/08 11:18
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#289
blakey87 (User)
Fresh Boarder
Posts: 6
graphgraph
User Offline Click here to see the profile of this user
Re:Please help admin 7 Months, 2 Weeks ago Karma: 0  
Yea I realized that the component does not enable use of mambots, do you have a solution for me to enable mambots possibly for this component?
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#294
SimpleByDesign (Admin)
Admin
Posts: 290
graph
User Online Now Click here to see the profile of this user
Re:Please help admin 7 Months, 2 Weeks ago Karma: 9  
There are ways to enable mambots within a component but they do require editing the component, and it may not be designed correctly to run them. However it is possible to manually enable the mambot by adding the javascript directly to your source code.

You will need to add the following to the header of your template (to enable XHTML compliance) otherwise any before the next bit of code.
Code:

&lt;script type=&quot;text/javascript&quot; src=&quot;/mambots/content/sbdnicertables/javascript/nicer_tables.js&quot;&gt;&lt;/script&gt; &lt;style type=&quot;text/css&quot; media=&quot;screen&quot;&gt;@import &quot;http://joomla10.simplebydesign.co.uk/mambots/content/sbdnicertables/sbdnicertables.css&quot;;&lt;/style&gt;
You will only need the css line if you plan to format the look via css. Once you have added that you will need to add the following below the table:
Code:

&lt;script language=&quot;JavaScript&quot; type=&quot;text/javascript&quot;&gt; var headerOff = 1; var footerOff = 0; var oddCol = '#cccccc'; var evenCol = '#ffffff'; var moverCol = '#f5f5f5'; var onclickCol = '#f5f5f5'; var oddStyle = 'sbdna'; var evenStyle = 'sbdna'; var moverStyle = 'sbdna'; var onclickStyle = 'sbdna'; var useCSS = 1; tigra_tables('table_id', headerOff, footerOff, oddCol, evenCol, moverCol, onclickCol, oddStyle, evenStyle, moverStyle, onclickStyle, useCSS ); &lt;/script&gt;
This is not enabling any of the filter/sorting. Basically you will need to replace table_id with the id of the table, and the configure the other parameters: headerOff - when to start highlighting the rows from the top of the table footerOff - when to stop hightlighting the rows from the bottom of the table oddCol - odd rows colour evenCol - even rows colour moverCol - mouse over colour onclickCol - on click row colour oddStyle,evenStyle,moverStyle,onclickStyle - leave these useCSS - use CSS for row info 1 yes, 0 no If you require filter/sorting please let us know and we'll have a look and post the javascript you require. Kind Regards
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#299
blakey87 (User)
Fresh Boarder
Posts: 6
graphgraph
User Offline Click here to see the profile of this user
Re:Please help admin 7 Months, 2 Weeks ago Karma: 0  
Thanks ill give it a try and let you know how it goes
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#312
blakey87 (User)
Fresh Boarder
Posts: 6
graphgraph
User Offline Click here to see the profile of this user
Re:Please help admin 7 Months, 1 Week ago Karma: 0  
I used the code, but the site stops loading and is just blank
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop
Visa Accepted Amex Accepted Accepted Master Card Accepted Paypal Accepted Solo Accepted Delta Accepted Maestro/Switch Accepted Electron Accepted
Joomla Template By Simple By Design.
Hosting by Simple By Design.