[MOD-phpLD]Small Hack: Show full category Path while approving sites-Dir.vc-msolution

Discussion in 'Directories' started by msolution, Aug 11, 2007.

  1. #1
    [MOD-phpLD]Small Hack: Show full category Path while approving sites-Dir.vc-msolution

    Hello,
    making my last mod and upgrading it to 3.x, i realised that loads of times some category names are repeated, though being valid, most commen being "Blog"

    One would find Blog as a root category, and yet you have Art Weblogs under Arts, Blog Hosting under Hosting,….etc

    Now in phpLD approve section, all i have is which category is the site submitted to!

    I thought it would be better if I were to know the whole path in the admin section so i know exactly where the submission has been made

    So put a small hack together HERE


    Hope this helps someone!

    Regards,
    M.
     
    msolution, Aug 11, 2007 IP
  2. MeetHere

    MeetHere Prominent Member

    Messages:
    15,399
    Likes Received:
    994
    Best Answers:
    0
    Trophy Points:
    330
    #2
    Looks great..
    Does this appear while editing/approving the link ?
     
    MeetHere, Aug 11, 2007 IP
    LeopardAt1 likes this.
  3. msolution

    msolution Well-Known Member

    Messages:
    1,182
    Likes Received:
    123
    Best Answers:
    0
    Trophy Points:
    175
    #3
    Yep, when u click the small icon next to the title, in the aprove section,
    the ajax popup comes up, .... there you can see the full path,

    you can see in the screen shot on my blog :)

    M.
     
    msolution, Aug 11, 2007 IP
  4. MeetHere

    MeetHere Prominent Member

    Messages:
    15,399
    Likes Received:
    994
    Best Answers:
    0
    Trophy Points:
    330
    #4
    Not the ajax popup...

    I mean to say - during editing the link ( on clicking the pencil icon)
     
    MeetHere, Aug 11, 2007 IP
  5. msolution

    msolution Well-Known Member

    Messages:
    1,182
    Likes Received:
    123
    Best Answers:
    0
    Trophy Points:
    175
    #5
    yes, :)
    in Approve section -> Click the icon -> and in the ajax popup you can see the category full path.

    M.
     
    msolution, Aug 11, 2007 IP
  6. MeetHere

    MeetHere Prominent Member

    Messages:
    15,399
    Likes Received:
    994
    Best Answers:
    0
    Trophy Points:
    330
    #6
    Does it appear during EDITING the listing ??

    Like when we are editing title, description, email, category etc.. Does it appear somewhere here on this page OR can you make it ?
     
    MeetHere, Aug 11, 2007 IP
  7. msolution

    msolution Well-Known Member

    Messages:
    1,182
    Likes Received:
    123
    Best Answers:
    0
    Trophy Points:
    175
    #7
    lol....sorry i missed that out,.... on the editing page,.... i guess that would be possible, let me know if ur intersted ill look into it.

    M.
     
    msolution, Aug 11, 2007 IP
  8. MeetHere

    MeetHere Prominent Member

    Messages:
    15,399
    Likes Received:
    994
    Best Answers:
    0
    Trophy Points:
    330
    #8
    I think this will help most of the owners..

    I suggest the full path visible just above the "category" drop down box ;)
     
    MeetHere, Aug 11, 2007 IP
  9. coolsitez

    coolsitez Well-Known Member

    Messages:
    2,586
    Likes Received:
    246
    Best Answers:
    0
    Trophy Points:
    183
    #9
    This is another handy mod. I often checked where the sub-category from manually. This should save a lot of editing time ;)
     
    coolsitez, Aug 11, 2007 IP
    LeopardAt1 likes this.
  10. humm

    humm बहादुर बच्चा

    Messages:
    4,346
    Likes Received:
    850
    Best Answers:
    0
    Trophy Points:
    310
    #10
    Very much needed... thanks a lot for this brilliant mod. :)
     
    humm, Aug 11, 2007 IP
  11. LeopardAt1

    LeopardAt1 Well-Known Member

    Messages:
    880
    Likes Received:
    126
    Best Answers:
    0
    Trophy Points:
    135
    #11
    Good work M. as usual.
     
    LeopardAt1, Aug 11, 2007 IP
  12. Fastian

    Fastian Peon

    Messages:
    2,085
    Likes Received:
    235
    Best Answers:
    0
    Trophy Points:
    0
    #12
    Great.
    Nicely done .... That will really help.

    And I will also reguest to have full category path appear while "Editing"
     
    Fastian, Aug 11, 2007 IP
    LeopardAt1 likes this.
  13. MeetHere

    MeetHere Prominent Member

    Messages:
    15,399
    Likes Received:
    994
    Best Answers:
    0
    Trophy Points:
    330
    #13
    Whats the status buddy ?
     
    MeetHere, Aug 12, 2007 IP
  14. Fastian

    Fastian Peon

    Messages:
    2,085
    Likes Received:
    235
    Best Answers:
    0
    Trophy Points:
    0
    #14
    @msolution

    Are u really sure you are using standard phpLD v3.2 and not some kind of highly customized version ?? :confused:

    Problem 1
    In your blog you said
    Find
    $sql = “SELECT {$tables[’link’][’name’]}.*, “.$db->IfNull(“{$tables[’category’][’name’]}.TITLE”, “‘Top’”).” AS `CATEGORY` FROM `{$tables[’link’][’name’]}` LEFT JOIN `{$tables[’category’][’name’]}` ON ({$tables[’link’][’name’]}.CATEGORY_ID = {$tables[’category’][’name’]}.ID) WHERE {$tables[’link’][’name’]}.ID = “.$db->qstr($id).” LIMIT 1″;
    PHP:
    There is no such thing, the closest one I was able to get is
    $sql = "SELECT {$tables['link']['name']}.*, ".$db->IfNull("{$tables['category']['name']}.TITLE", "'Top'")." AS `CATEGORY` FROM `{$tables['link']['name']}` LEFT JOIN `{$tables['category']['name']}` ON ({$tables['link']['name']}.CATEGORY_ID = {$tables['category']['name']}.ID) WHERE {$tables['link']['name']}.ID = ".$db->qstr($id)." LIMIT 1";
    PHP:
    There is no >

    Problem 1
    You said to find
    <tr class=“{cycle values=”odd,even“}”><td class=“label”>{l}Category{/l}:</td><td class=“smallDesc”>{if $row.CATEGORY_ID eq ‘-1′}<span class=“orphan”>{l}Orphan{/l}</span>{else}{$linkInfo.CATEGORY|escape|trim}({$linkInfo.CATEGORY_ID}){/if}</td></tr>
    PHP:
    And the closest thing I have is
    <tr class="{cycle values="odd,even"}"><td class="label">{l}Category{/l}:</td><td class="smallDesc">{$linkInfo.CATEGORY|escape|trim}</td></tr>
    PHP:
    There is no {if $row.CATEGORY_ID eq ‘-1′}

    I think you need to revise your instructions. :confused:
     
    Fastian, Aug 12, 2007 IP
  15. mrcrowley

    mrcrowley Peon

    Messages:
    1,034
    Likes Received:
    54
    Best Answers:
    0
    Trophy Points:
    0
    #15
    Well good attempt at the mod anyway this would be very useful i will check back to see if problems are fixed :)
     
    mrcrowley, Aug 12, 2007 IP
  16. msolution

    msolution Well-Known Member

    Messages:
    1,182
    Likes Received:
    123
    Best Answers:
    0
    Trophy Points:
    175
    #16
    :D, thats Wordpress playing on me, should be ->, you are right :)

    just ensure to add

    
    <br />[{$linkInfo.CACHE_URL|escape|trim}]
    
    Code (markup):

    i think i have the latest build, dated. phpLD_07-23-07.zip, but it is phpLD3.2 :)

    I will rewrite the instruction keeping your feedback in mind
    thanx for the inputs :)

    Regards,
    M.
     
    msolution, Aug 12, 2007 IP
  17. Fastian

    Fastian Peon

    Messages:
    2,085
    Likes Received:
    235
    Best Answers:
    0
    Trophy Points:
    0
    #17
    I did try to do the necessary changes by comparing but it was not working for me. I am going to try again.
    (And yea I was also thinking its something to do with your WP)

    Mine is based on phpLD_06-28-07, the template change is not that much of issue (I mean I can see the changes) but I thought to let you know and also to other who will try to use it.
     
    Fastian, Aug 12, 2007 IP
  18. msolution

    msolution Well-Known Member

    Messages:
    1,182
    Likes Received:
    123
    Best Answers:
    0
    Trophy Points:
    175
    #18
    Hi,
    sorry for the delay, but i was into adding deep links on my site!

    i have rewritten the blog post, and have added an additional post for the editing section :)

    lemme know if alls well!

    Regards,
    M.
     
    msolution, Aug 14, 2007 IP
  19. rickvb

    rickvb Active Member

    Messages:
    157
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    53
    #19
    Great, this will come in handy for me :)
     
    rickvb, Aug 14, 2007 IP
  20. MeetHere

    MeetHere Prominent Member

    Messages:
    15,399
    Likes Received:
    994
    Best Answers:
    0
    Trophy Points:
    330
    #20
    Should we add those ## also ??
     
    MeetHere, Aug 14, 2007 IP