Coder Social home page Coder Social logo

q2a-breadcrumbs's Introduction

Question2Answer Breadcrumbs plugin

A Question2Answer plugin which displays navigational breadcrumbs showing the path to the currently viewed page.

What is a breadcrumb in websites

A breadcrumb is a type of secondary navigation scheme that reveals the user’s location in a website or Web application.

Screenshot

Why it is needed ?

Breadcrumbs are recomended for Better SEO. If you are maintainning a huge website then you should take care of making it better organized and easy navigation.

Q&A sites are really big having many different pages well structured with Categories and Tags. And This breadcrumb plugin will give you better accessibility and Navigation for your website.

From a search engine point of view; Google actually displays the breadcrumbs in the search results giving you more links in each search listing, which is a positive thing. It Provides another mechanism to highlight important keywords for the search engines to note in your navigation.

Also it adds content relevancy to your pages and adds on-page SEO emphasis that highlights specific anchor text rich linking to internal pages.

Installation

  1. Install Question2Answer. This plugin requires at least version 1.6 (see the change log for details)

  2. Get the source code for this plugin from Github, either using Git, or downloading directly:

    • To download using git, install git and then type

      git clone https://github.com/amiyasahu/q2a-breadcrumbs.git q2a-breadcrumbs

    • To download directly, go to the latest release and click Download ZIP

  3. Copy the plugin folder to qa-plugin directory

  4. Login into your website and visit the Admin -> Plugins section

  5. Click on options link under Q2A Breadcrumbs section for configuration

  6. Visit Admin -> Layout , Add the Breadcrumbs widget in your desired location .

License

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

Disclaimer

This code has not been extensively tested on high-traffic installations of Q2A. You should perform your own tests before using this plugin on a live (production) environment.

About Question2Answer

Question2Answer is a free and open source PHP and MySQL based platform for creating Question & Answer sites. For more information visit Q2A's official site at question2answer.org

q2a-breadcrumbs's People

Contributors

alvarofg avatar amiyasahu avatar bertrandgorge avatar bitdeli-chef avatar dennwer avatar htcode avatar tryazi avatar ufukart avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

q2a-breadcrumbs's Issues

issue in the BreadcrumbList schema

The issue involves the BreadcrumbList schema implementation in the Q2A Breadcrumbs plugin. The position property, essential for indicating the order of breadcrumb items, was missing. According to Schema.org guidelines, each item in a BreadcrumbList must have a position property, starting from 1 for the first item. This omission leads to incomplete structured data, potentially causing issues with search engines and other services relying on this data for interpreting website navigation.

test url for my website

https://search.google.com/test/rich-results/result/r%2Fbreadcrumbs?id=7Lt3PIx3ShPUc2vIO8zCsg&hl=en&url=https%3A%2F%2Fwahat.mdroob.com%2F875%2F%D8%B8%D9%84%D8%AA-%D9%86%D8%A7%D8%B1-%D8%A7%D9%84%D9%85%D8%AC%D9%88%D8%B3-%D9%85%D9%88%D9%82%D8%AF%D8%A9-1-%D9%86%D9%82%D8%B7%D8%A9

XSS vector in Question Page Breadcrump Generator

In Ami_Breadcrumb.php you are taking user generated content without any input validation.

$q_title = @$question_page['raw']['title'];

You could add
" $q_title = htmlspecialchars($q_title, ENT_QUOTES, 'UTF-8');" afterwards to solve this.

Icons no longer a feature?

I've used some of the earlier versions and the icons were an awesome touch to this already amazing plugin.
I wanted to know if Icons are currently supported or if they ever will be supported again?

sub category order

sub category order is wrong
Category: Home > Accessories -> Headphones

Breadcrumb: Home > Headphones -> Accessories

Inefficient queries

Hi Ami, I've just been looking at a few plugins to see how fast they are. This one does seem pretty good for speed, but I did notice one issue here: https://github.com/amiyasahu/q2a-breadcrumbs/blob/master/inc/Ami_Breadcrumb.php#L126

You are running SQL queries inside a loop so with nested categories I end up with 4 queries:

SELECT categoryid, parentid, title, tags, qcount, content, backpath FROM qa_categories WHERE tags='parentcategory'
SELECT categoryid, parentid, title, tags, qcount, content, backpath FROM qa_categories WHERE tags='cat2'
SELECT categoryid, parentid, title, tags, qcount, content, backpath FROM qa_categories WHERE tags='cat3'
SELECT categoryid, parentid, title, tags, qcount, content, backpath FROM qa_categories WHERE tags='cat4'

This could be replaced with a single query like this:

SELECT categoryid, parentid, title, tags, qcount, content, backpath FROM qa_categories WHERE tags IN ('parentcategory', 'cat2', 'cat3', 'cat4')

And then loop through the results to get the info you need. Hope that helps :)

Category link and text fix

When a category is clicked , breadcumb is displaying URL instead of Category name like this

Category name: 2000 Model Ford Cars

Home > 2000-Model-Ford-Cars

It suppose to be

Home> 2000 Model Ford Cars

-- Reported by @amint

tag page showing white page after installing plugin

hi
thanks for this plugin, it helped me displaying breadcrumbs and thanks for your last update for the deprecated include issue i have applied the change and it solve data-vocabulary.org schema deprecated problem is Google search console.

But , we got a new issue
after installing this plugin, tag page showing white page with no content here a screenshot
https://prnt.sc/Hez1h1vitYqN

and after disabling the plugin tag page show content again , here is a screenshot
https://prnt.sc/2vQwGHJjq5op

can you help please

User Page

When in user page, the breadcrumb is listing the "users", yet using the word 'user'. I think it should say "users" since that's where the link is taking you.

Schema error

error : url A value for the url field is required.

This error shows to all urls like cat, question and tags

See the image : https://ibb.co/mQ6TFQ

Regards,
Raja.

Undefined index: q_view

To reproduce:
1-At admin activate the post approval, so that a question posted/edited by a user has to be approved to be displayed.
2- login as another user whose post needs approval and post a question
3- note down (copy) the url of that question and logout
4- now at the address bar enter the ur of that question. e.g.
yourDomain.com/index.php?qa=8

That opens a page which a message which reads "This question is waiting for approval"
right?

however at the same time it shows these error messages below:
Notice: Undefined index: q_view in /qa-plugin/q2a-breadcrumbs-master/qa-breadcrumbs-widget.php on line 117

Notice: Undefined index: q_view in /qa-plugin/q2a-breadcrumbs-master/qa-breadcrumbs-widget.php on line 118

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.