PhpDig.net

Go Back   PhpDig.net > PhpDig Forums > Mod Requests

Reply
 
Thread Tools
Old 08-19-2005, 03:28 AM   #1
nobrin
Green Mole
 
Join Date: Aug 2005
Posts: 2
A thing called refactoring

1) I think that phpdig is a great tool.
2) I think that it could benefit *a lot* from a deep refactoring.

I took a look at the code, tried to create my own custom_search, then tried to create my own search.php and got disappointed by the low "separation of concern" of the code.

Just an example: with the array mode, the search gives back the <a> tag!
Oh, yes, config.php let you change the link target... but what about adding other customization to that tag (eg class="myown")?

In my (humble) opinion, this is not good software design. And I say this (here) because I like phpdig, and I appreciate the work done so far. Otherwise, I would simply don't mind.

Is this the right place to talk about these aspects? Is it possible to discuss about the software design?
nobrin is offline   Reply With Quote
Old 08-19-2005, 08:42 AM   #2
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
In the config file, right before:
Code:
// now set $template_demo to clean $template filename or empty string
Set the following:
Code:
$template = "array";
Now backup your old custom_search.php, use the original search.php, and then try out the attached file.
Attached Files
File Type: zip custom_search.zip (2.0 KB, 11 views)
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 10:47 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.