![]() ![]() |
Dynamic meta tags outside of topics |
Feb 10 2008, 08:57 AM
Post
#1
|
|
|
Administrator ![]() ![]() ![]() Group: Root Admin Posts: 5,130 Joined: 25-January 07 Member No.: 1 |
With CommunitySEO 1.2.0, when viewing topic pages the keywords and description meta tags can be dynamically set (if configured to do so in the Admin CP). However, you can use the same functionality in other sections of your site, such as in your Gallery or Blog (or in any other third party modification you have installed!).
In order to do so you just have to edit the appropriate files and pass the appropriate data. We cannot account for every modification out there (though if you find one and make this change for a third-party component or modification, by all means feel free to share your changes for others by replying to this FAQ), however below you will find an example for your IP.Gallery system, if installed. This should help you understand how to set dynamic meta tags for various areas of your site using CSEO. We would want to set the dynamic meta tags for Gallery image view pages using the image caption and image description fields. To do this we'll need to edit /sources/components_public/gallery/img_view.php. In this file find CODE if( ! $this->data['id'] ) { $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'img_not_found' ) ); } This code in the file comes right after pulling the image data from the database (it is checking if the image was found). Immediately afterwards we can add CODE $this->ipsclass->seo->sort_metaTags( $this->data['description'], $this->data['caption'] ); What we are doing here is calling the "sort_metaTags" method of CommunitySEO and passing the description and title to it. CommunitySEO will remove punctation and HTML tags, and set the keywords and descriptions based on the data passed to it. You can do the same thing from any page you wish to by simply passing the description and title for CSEO to inspect. Starting in 1.2.0, the changes to /sources/action_public/topics.php will do this for topic view pages for you. |
|
|
|
Sep 2 2008, 05:37 AM
Post
#2
|
|
|
Administrator ![]() ![]() ![]() Group: Root Admin Posts: 5,130 Joined: 25-January 07 Member No.: 1 |
For Invision Download Manager
In sources/components_public/downloads/display.php find CODE $this->ipsclass->DB->cache_add_query( 'get_monster_file', array( 'file_id' => $file_id ), 'sql_idm_queries' ); $this->ipsclass->DB->cache_exec_query(); $file = $this->ipsclass->DB->fetch_row(); add afterwards CODE $this->ipsclass->seo->sort_metaTags( $file['file_desc'], $file['file_name'] );
|
|
|
|
Nov 19 2008, 11:34 PM
Post
#3
|
|
![]() Advanced Member ![]() ![]() ![]() Group: Customers Posts: 70 Joined: 27-February 08 Member No.: 834 |
and for base forum like http://communityseo.com/forums/IPB-SEO-FAQ...Tricks-f14.html
i have so many forums and put 1 to 1 is realy pain in the ass -------------------- |
|
|
|
![]() ![]() |
Similar Topics
| Topic Title | Replies | Topic Starter | Views | Last Action | |||
|---|---|---|---|---|---|---|---|
![]() |
7 | admin | 2,944 | 30th December 2008 - 10:17 AM Last post by: Silent J |
|||
![]() |
3 | admin | 2,906 | 9th February 2008 - 05:25 AM Last post by: admin |
|||
![]() |
8 | shifted99 | 1,721 | 7th August 2007 - 05:04 AM Last post by: admin |
|||
![]() |
0 | admin | 2,058 | 8th February 2007 - 07:37 PM Last post by: admin |
|||
![]() |
0 | RSS Aggregator | 814 | 14th February 2007 - 11:50 AM Last post by: RSS Aggregator |
|||
Links to this thread
|
Lo-Fi Version | Time is now: 6th January 2009 - 04:18 PM |