Results 1 to 11 of 11

Custom Addons Rewrite

This is a discussion on Custom Addons Rewrite within the Troubleshooting forums, part of the vBSEO SEO Plugin category; I'm adding a custom addon to my site which I would like to have the urls use vbseo . Because ...

  1. #1
    Junior Member
    Real Name
    Ryan Amos
    Join Date
    Aug 2005
    Posts
    10
    Liked
    0 times

    Custom Addons Rewrite

    I'm adding a custom addon to my site which I would like to have the urls use vbseo.

    Because the software is encoded, I have no idea where to go with this. Here's how my links are:
    http://www.site.com/page.php

    Then there are links on that page which need to look like this:
    http://www.site.com/page/title-test.html

    Just like the forums are redirected. Is there a function I can call to have the links redirected automatically?

    The biggest issue I'm having with this software is because it's encoded.

    I need help on this ASAP.

  2. #2
    Senior Member
    Real Name
    Keith Cohen
    Join Date
    Jul 2005
    Location
    Raleigh, NC USA
    Posts
    6,147
    Liked
    12 times
    You can't use the Custom Rewrite Rules section of the vbSEO config?

  3. #3
    Junior Member
    Real Name
    Ryan Amos
    Join Date
    Aug 2005
    Posts
    10
    Liked
    0 times
    The thing is, I want the titles to be automatically striped of characters like the titles of the threads are.

  4. #4
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    25,689
    Liked
    157 times
    The custom rewrite rules allow you to prepare a new seo url based on the parameters that exists in the original url only. So, if you custom addon will have urls like page.php?title=the_page_title, then you can make a custom rule to have seo url with title in it.
    Oleg Ignatiuk / Crawlability Inc.
    vBSEO 3.6.0 GOLD Released!
    Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!


  5. #5
    Junior Member
    Real Name
    Ryan Amos
    Join Date
    Aug 2005
    Posts
    10
    Liked
    0 times
    Oleg,

    Thanks for your reply. I'm aware of how it works so that's not an issue.

    I can write my own rewrites but here's where the issue comes in to play... Here is what my rewrites would look like (without regex):

    http://www.site.com/filename.php
    This is fine, nothing will happen.

    http://www.site.com/filename/9-this-a-sample-it.html
    This page would goto:
    http://www.site.com/filename.php?id=9

    That's simple right? Correct.

    Now, the question I'm asking for is... My title is originally something like this:
    This a Sample & It should be stripped after 4 words.

    You have somewhere within your code a function that I'm assuming does this for you. I've never actually used encrypted code so I'm not sure exactly how this will work, but... Here's what I want...

    I want to send that title to a function which will return the shorted and SEO string for the url. So let's give some sample php code.

    [PHP]$url = vbseo_url($var['title']);[PHP]

    Then I'll just use the $url in the vBulletin template. Do you follow what I'm saying?

  6. #6
    vBSEO Staff Juan Muriente's Avatar
    Real Name
    Juan Carlos Muriente
    Join Date
    Jun 2005
    Location
    Puerto Rico
    Posts
    14,267
    Liked
    554 times
    Quote Originally Posted by Amos
    Just like the forums are redirected. Is there a function I can call to have the links redirected automatically?
    Yes, the CRR will 301 redirect anything from the previous (dynamic) url to the new, static one.

    Example:
    Code:
    '^showgroups\.php$' => 'forumleaders/'
    Will:
    1) rewrite 'showgroups.php' as 'forumleaders/' (and)
    2) will 301 redirect showgroups.php to 'forumleaders/'

    Check it out: http://www.vbseo.com/forumleaders/

    Edit: This was in reply to Custom Addons Rewrite
    Juan Muriente / Crawlability Inc.
    vBSEO 3.6.0 GOLD Released!
    Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!


  7. #7
    vBSEO Staff Juan Muriente's Avatar
    Real Name
    Juan Carlos Muriente
    Join Date
    Jun 2005
    Location
    Puerto Rico
    Posts
    14,267
    Liked
    554 times
    Quote Originally Posted by Amos
    Oleg,

    Thanks for your reply. I'm aware of how it works so that's not an issue.

    I can write my own rewrites but here's where the issue comes in to play... Here is what my rewrites would look like (without regex):

    http://www.site.com/filename.php
    This is fine, nothing will happen.

    http://www.site.com/filename/9-this-a-sample-it.html
    This page would goto:
    http://www.site.com/filename.php?id=9

    That's simple right? Correct.

    Now, the question I'm asking for is... My title is originally something like this:
    This a Sample & It should be stripped after 4 words.

    You have somewhere within your code a function that I'm assuming does this for you. I've never actually used encrypted code so I'm not sure exactly how this will work, but... Here's what I want...

    I want to send that title to a function which will return the shorted and SEO string for the url. So let's give some sample php code.

    [php]$url = vbseo_url($var['title']);[php]

    Then I'll just use the $url in the vBulletin template. Do you follow what I'm saying?
    The 'URL clipping' feature is specific to vBSEO's vBulletin rewriting functionality, not the CRR. However, if you want to clip (and rewrite) a specific link, simply add it to your templates using vBulletin's native format (dynamic) - - vBSEO will modify it as it does with all others links.
    Juan Muriente / Crawlability Inc.
    vBSEO 3.6.0 GOLD Released!
    Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!


  8. #8
    Junior Member
    Real Name
    Ryan Amos
    Join Date
    Aug 2005
    Posts
    10
    Liked
    0 times
    I attempted to do that and it was not working which is why I was looking for help.

    Do i have to have the full URL in a variable for this to work?

    I need more information on how this works.

    In my template I had this:
    page.php?id=8
    That didn't work...

    I then just tried this:
    page/$var[tipid]-$var[title].html

    That returns a link like this:
    page/8-This is a Title.html

    I need it to do the clipping you were talking about.

    I just thought of something... It's a custom template, does this matter? I'm going to PM you the actual link to the site. I don't really want it public yet.

  9. #9
    vBSEO Staff Juan Muriente's Avatar
    Real Name
    Juan Carlos Muriente
    Join Date
    Jun 2005
    Location
    Puerto Rico
    Posts
    14,267
    Liked
    554 times
    Quote Originally Posted by Amos
    In my template I had this:
    page.php?id=8
    That didn't work...

    I then just tried this:
    page/$var[tipid]-$var[title].html

    That returns a link like this:
    page/8-This is a Title.html

    I need it to do the clipping you were talking about.
    Ok, try this:

    PHP Code:
    if(@include_once('includes/functions_vbseo.php')) 

    $seotitle vbseo_filter_text($title); // " A simple example here!" => "simple-example-here" 

    Not allowed characters are stripped and stop-words removed
    Juan Muriente / Crawlability Inc.
    vBSEO 3.6.0 GOLD Released!
    Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!


  10. #10
    Junior Member
    Real Name
    Ryan Amos
    Join Date
    Aug 2005
    Posts
    10
    Liked
    0 times
    That's the function I needed.

    I just did this code to test it though:
    PHP Code:
    echo vbseo_filter_text($var['title']); 
    It outputed the correct line though.

  11. #11
    vBSEO Staff Juan Muriente's Avatar
    Real Name
    Juan Carlos Muriente
    Join Date
    Jun 2005
    Location
    Puerto Rico
    Posts
    14,267
    Liked
    554 times
    Great! Closing this thread.
    Juan Muriente / Crawlability Inc.
    vBSEO 3.6.0 GOLD Released!
    Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!


Similar Threads

  1. Syntax for Custom Rewrite Rules
    By Joe Ward in forum Custom Rewrite Rules
    Replies: 33
    Last Post: 02-10-2011, 09:49 PM
  2. vBSEO 2.0 RC7 Released
    By Juan Muriente in forum vBSEO Announcements
    Replies: 17
    Last Post: 09-09-2005, 12:00 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •