![]() ![]() |
Add 'Keyword Sniffer' to IPB forums |
Jul 3 2008, 04:46 AM
Post
#1
|
|
|
Administrator ![]() ![]() ![]() Group: Root Admin Posts: 4,991 Joined: 25-January 07 Member No.: 1 |
This article describes how you can easily install our keyword sniffer script to your IPB forums
Firstly, you must ensure your templates allow "<php>" tags. Open init.php and find CODE define( 'IPB_ACP_ALLOW_TEMPLATE_PHP', 0 ); Make the 0 a 1 like so CODE define( 'IPB_ACP_ALLOW_TEMPLATE_PHP', 1 ); If it's already a 1 (for instance, if you installed our tagging script already) then you can skip this step. We'll assume that you placed the keyword script files in your IPB forum directory. If not, you will need to adjust the include statement to point to the script. Add the following code on the page where you want the keyword script block to show up. I added it immediately at the beginning of the "All Global HTML" -> "global_board_footer" template, but you can add it anywhere (this code DOES need to be in a template and not in the global wrapper, however). CODE <php> if( include_once( './keywords.php' ) ) { if( is_object( $startMeUp ) ) { $this->tagcontent = $startMeUp->tagcloudKeywords(); } } </php> <if="$this->tagcontent"> <br /> <div class='borderwrap'> <div class='maintitle'>Tag cloud:</div> <div class='tablepad'>{$this->tagcontent}</div> </div> <br /> </if> That's it - adjust the skinning to suit your tastes. Visit our forum index page and scroll to the bottom to see the end result. |
|
|
|
Jul 3 2008, 08:23 AM
Post
#2
|
|
|
Advanced Member ![]() ![]() ![]() Group: Customers Posts: 47 Joined: 21-March 07 Member No.: 36 |
This works great, thanks a lot!
|
|
|
|
Jul 12 2008, 06:36 AM
Post
#3
|
|
|
Administrator ![]() ![]() ![]() Group: Root Admin Posts: 4,991 Joined: 25-January 07 Member No.: 1 |
Wanted to add a note, as we've had a few questions on this already.
The tagcloudKeywords() method accepts a couple of parameters too. CODE /** * Show the tagcloud * * @access public * @param integer Number of keywords to pull * @param boolean Whether or not to format the results * @param string [popular|alpha] Ordering of keywords * @return void **/ function tagcloudKeywords( $count=15, $format=1, $mode="alpha" ) So you can change the skin template to CODE $this->tagcontent = $startMeUp->tagcloudKeywords( 100, 1, 'popular' ); for example, to pull the top 100 results, with size-formatting, ordered by popularity (rather than alphabetically). |
|
|
|
Jul 15 2008, 11:00 AM
Post
#4
|
|
|
Advanced Member ![]() ![]() ![]() Group: Customers Posts: 261 Joined: 29-August 07 Member No.: 424 |
I have installed the script like described. Made the changes in the init php and add the code in the wrapper.
What could be the reason why the extra table won't be displayed? |
|
|
|
Jul 16 2008, 05:43 AM
Post
#5
|
|
|
Administrator ![]() ![]() ![]() Group: Root Admin Posts: 4,991 Joined: 25-January 07 Member No.: 1 |
I have installed the script like described. Made the changes in the init php and add the code in the wrapper. What could be the reason why the extra table won't be displayed? Firstly, I fixed the code above to take into account the download manager error fyi. I believe if I'm understanding what you are referring to, the module is actually working correctly. The table only shows when there are keywords to show. |
|
|
|
Jul 16 2008, 10:03 AM
Post
#6
|
|
|
Advanced Member ![]() ![]() ![]() Group: Customers Posts: 261 Joined: 29-August 07 Member No.: 424 |
The Access to the DL module works now. Unfortunately i have no explanation why the keyword cloud wont be shown on index
|
|
|
|
Jul 17 2008, 06:12 AM
Post
#7
|
|
|
Administrator ![]() ![]() ![]() Group: Root Admin Posts: 4,991 Joined: 25-January 07 Member No.: 1 |
Yeah, I think you'll need to submit a ticket. If you look at our index you can see the keywords at the bottom of the page, so this is more of a support issue.
|
|
|
|
Jul 17 2008, 11:37 PM
Post
#8
|
|
|
Advanced Member ![]() ![]() ![]() Group: Customers Posts: 35 Joined: 22-November 07 Member No.: 610 |
How to add to lofiversion skin of IPB ?
|
|
|
|
Jul 18 2008, 04:57 AM
Post
#9
|
|
|
Administrator ![]() ![]() ![]() Group: Root Admin Posts: 4,991 Joined: 25-January 07 Member No.: 1 |
All you really have to do is include the file, then run the function to show the keywords as noted in the instructions. You can do that on any php file - just use the same generic instructions on the lofi version file that are in the instructions.
|
|
|
|
Aug 12 2008, 01:06 AM
Post
#10
|
|
|
Advanced Member ![]() ![]() ![]() Group: Customers Posts: 456 Joined: 14-July 07 From: Wrocław / Poland Member No.: 335 |
how to add this script to the tagging section?
I think that I had seen such topic but now I'm searching about 1 hour and nothing found |
|
|
|
Aug 13 2008, 04:11 AM
Post
#11
|
|
|
Administrator ![]() ![]() ![]() Group: Root Admin Posts: 4,991 Joined: 25-January 07 Member No.: 1 |
This module and the tag module are completely separate. You could try inserting this code into the HTML tag module block to have it display in the tag module block, if you wanted, but I haven't tested it to see how well that will work.
|
|
|
|
Sep 5 2008, 01:04 AM
Post
#12
|
|
|
Advanced Member ![]() ![]() ![]() Group: Customers Posts: 143 Joined: 10-September 07 From: CA Member No.: 459 |
When I add
CODE <php> if( include_once( './keywords.php' ) ) { if( is_object( $startMeUp ) ) { $this->tagcontent = $startMeUp->tagcloudKeywords(); } } </php> <if="$this->tagcontent"> <br /> <div class='borderwrap'> <div class='maintitle'>Tag cloud:</div> <div class='tablepad'>{$this->tagcontent}</div> </div> <br /> </if> to global_board_footer it is taking my forum offline. Any idea what I may be doing wrong? |
|
|
|
Sep 8 2008, 03:15 PM
Post
#13
|
|
|
Advanced Member ![]() ![]() ![]() Group: Customers Posts: 143 Joined: 10-September 07 From: CA Member No.: 459 |
Should I submit a ticket?
|
|
|
|
Sep 8 2008, 06:19 PM
Post
#14
|
|
|
Administrator ![]() ![]() ![]() Group: Root Admin Posts: 4,991 Joined: 25-January 07 Member No.: 1 |
Yes
|
|
|
|
Sep 12 2008, 10:46 AM
Post
#15
|
|
|
Advanced Member ![]() ![]() ![]() Group: Customers Posts: 117 Joined: 15-December 07 Member No.: 663 |
Before I submit a ticket, can anyone offer any advice, basically I've added the code to a portal block on my homepage which works perfectly although using the exact instructions by Admins first post shows me nothing anywhere else. I've googled a few of my pages in an effort to generate some keywords though it's just plain blank, nothing!.
Any advice appreciated Marko -------------------- |
|
|
|
![]() ![]() |
Similar Topics
| Topic Title | Replies | Topic Starter | Views | Last Action | |||
|---|---|---|---|---|---|---|---|
![]() |
0 | RSS Aggregator | 785 | 1st February 2007 - 09:16 AM Last post by: RSS Aggregator |
|||
![]() |
0 | RSS Aggregator | 963 | 5th February 2007 - 11:18 AM Last post by: RSS Aggregator |
|||
![]() |
0 | RSS Aggregator | 498 | 8th March 2007 - 07:23 PM Last post by: RSS Aggregator |
|||
![]() |
0 | RSS Aggregator | 499 | 20th April 2007 - 08:53 PM Last post by: RSS Aggregator |
|||
![]() |
0 | RSS Aggregator | 266 | 1st May 2007 - 10:38 AM Last post by: RSS Aggregator |
|||
Links to this thread
|
Lo-Fi Version | Time is now: 1st December 2008 - 05:44 PM |