Download & Extend

Create specified ad type

Project:Advertisement
Version:6.x-2.x-dev
Component:ad module
Category:support request
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

I need to create specific ad type without selecting type switch and don't know how to do it so i create little patch. Is there any other way to do it?

function ad_form(&$node, &$form_state) {
 
  /*
  * Add preselect ad type
  */
  $adtype = arg(3);
  if (!empty($adtype)) {
    $adtype = arg(3);
    $node->adtype=$adtype;
    $adtypes = 1;
  }

  $form = array();
AttachmentSize
ad_form_preselect.patch474 bytes