Jump to content

PHP Question - Can You Help?


markscarts

Recommended Posts

I would like to add several site docs, but wish to prevent them showing up through viewDoc . . . [edit] I meant boxes/siteDocs.tpl

To clarify, I have a number of site docs that show up through the viewDoc system, from php to siteDocs to viewDoc box template . . . that is as it should be.

But I want to add other site docs that do not show up in that siteDocs menu on my site . . . I want to put links to these extra docs in a separate area on the page.

Any advice on how to accomplish this?

Link to comment
Share on other sites

Thanx for the tip M8, I'll work on that first then come back to my orig prob ;)

OK, should be all better now in Mozilla, I adjusted using ns, haven't seen it in FF . . .

-------------

As to location of docs viewed: I want to view them inside of CC, just like site docs work now - I only want to exclude the links to certain docs, not from viewDoc.tpl as previously stated, but from boxes/siteDocs.tpl - that is to say, all I want to do is exclude certain of the links from appearing in that loop.

I want to manually link to them from another area of the page - when link is clicked, behaves just like all site docs that are viewed through viewDoc :(

Link to comment
Share on other sites

this could be made with a flag cheching. Add new column to CubeCart_docs table . This colum (named flag or etc)should be filled with some value [1 for view doc in list, 0 for doesnt view]. This value(flag) should be checked in a first siteDocs.inc.php select

$results = $db->select("SELECT doc_id, doc_name FROM ".$glob['dbprefix']."CubeCart_docs ORDER BY doc_name ASC");

like

$results = $db->select("SELECT doc_id, doc_name FROM ".$glob['dbprefix']."CubeCart_docs WHERE flag=1 ORDER BY doc_name ASC");
Result will be list of viewable docs id, names ;)

This should be manageable in ACP by adding apropriate PHP/HTML code to siteDocs.php

If you wish i can write a mod for U :(

Link to comment
Share on other sites

Mark, I've addressed this issue before. Simply edit the doc_id of the docs you don't want displayed manually in PHPMyAdmin. Set them to 101 and above. Then edit /includes/boxes/siteDocs.inc.php - line 37 to by adding " WHERE doc_id < 100" to the end of the SELECT statement...like this:

// query database

$results = $db->select("SELECT doc_id, doc_name FROM ".$glob['dbprefix']."CubeCart_docs WHERE doc_id < 100 ORDER BY doc_name ASC");

That will do the trick all by itself. :( You can add stuff to the admin, but this is a quick/dirty way that will work without having to do lots of extra stuff.

;)

Link to comment
Share on other sites

Uh oh! Site down . . . Error message:

MySQL Error Occured

1054: Unknown column 'view' in 'where clause'

QUERY = SELECT doc_id, doc_name FROM CubeCart_docs WHERE view=1 ORDER BY doc_name ASC

Unknown column 'view'

yet:

mysql.gif

Column is there . . .

Crap . . . just realized, added new column to WRONG db :D:D:^^:

Going back to fix it :P

Link to comment
Share on other sites

  • 1 month later...

I want this mod too.

None of the downloads are working in the old download section. Hopefully it will be up again soon, but in the meantime is there another place to download this mod?

Jen

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...