Welcome, Guest. Please login or register.
Did you miss your activation email?
May 26, 2012, 09:23:57 AM

Login with username, password and session length
Search:     Advanced search
Interested in joining the WebsiteBaker team?
For more Information read here or on our new website.
155535 Posts in 21713 Topics by 7737 Members
Latest Member: chris85
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: Attaching a form to news 3.5 or topics module  (Read 343 times)
jdjdjd

Offline Offline

Posts: 21


« on: May 21, 2010, 09:35:44 AM »

Hi all, I'm currently working on a site for a recruitment consultancy who need a simple and intuitive way to list their vacancies to the public whilst splitting them into sections of industry. I've tried editing the code in the job listing module, but it lacks security and seems fairly dated.

Does anyone know how difficult it'd be to have a listing of news items, clicking through them to the article with an MPform attached to the page, and having a form field pull the data from the article title? This seems to me to be the most direct solution, but alas I'm a designer and not a coder. Any help would be much appreciated!
Logged
snark
Guest
« Reply #1 on: May 27, 2010, 02:15:06 PM »

use the sectionpicker droplet

Code:
global $database, $wb, $TEXT;
$content = ' ';
$query_sec = $database->query("SELECT section_id,module FROM ".TABLE_PREFIX."sections WHERE section_id = '$sid' ");
if($query_sec->numRows() > 0) {
$section = $query_sec->fetchRow();
$section_id = $section['section_id'];
$module = $section['module'];
ob_start();
require(WB_PATH.'/modules/'.$module.'/view.php');
$content = ob_get_contents();
    ob_end_clean();
}
return $content;
Logged
jdjdjd

Offline Offline

Posts: 21


« Reply #2 on: June 01, 2010, 10:15:26 AM »

Thanks Snork, I hadn't come across this particular droplet before. It works a treat!
Logged
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!