Announcement

Collapse
No announcement yet.

help in redirecting cms articles to another website

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • [CMS] help in redirecting cms articles to another website

    Hello

    I want to add a plugin to the cms that do the following:

    $aritcle_ID= cms article ID ; //

    if (the $aritcle_ID is between (60) and (2000))

    {

    send 301 redirect to 'www.example.com/p='.(string) ($article_ID - 60);

    }

    so if the user ask for http://myforum.com/content.php?r=65-some-article

    he will be 301 redirected to http://www.example.com/p=5


    questions:

    where do I write this plugin (what is the aproperate hook)

    what should I write in ?

    thank you in advance
    Last edited by Oracle simsim; Fri 3 Sep '10, 11:33am.
    منتديات درر العراق

  • #2
    You will probably get better help with writing plugins over on vbulletin.org, the modification site.

    Please don't PM or VM me for support - I only help out in the threads.
    vBulletin Manual & vBulletin 4.0 Code Documentation (API)
    Want help modifying your vbulletin forum? Head on over to vbulletin.org
    If I post CSS and you don't know where it goes, throw it into the additional.css template.

    W3Schools <- awesome site for html/css help

    Comment


    • #3
      Thank you Lynne

      I don't know why, but I love to post my questions here.. even the fact that I dont not get helpful answers, mostly

      I did it ...

      hook: vbcms_content_querydata

      code:

      PHP Code:
      $my_article_start=68;
      $my_article_end=20789;
      if ((
      intval($this->itemid)>=$my_article_start) And (intval($this->itemid)<=$my_article_end))
      {
      $my_url='http://www.example.com/?p='.(string)(intval($this->itemid)-67);
      Header"HTTP/1.1 301 Moved Permanently" );
      Header"Location: $my_url); 
      //echo $my_url;
      exit(); 
      amature code may be .. but it work very well
      منتديات درر العراق

      Comment

      widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
      Working...
      X